-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexample_usage.py
More file actions
69 lines (53 loc) · 2.51 KB
/
Copy pathexample_usage.py
File metadata and controls
69 lines (53 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/usr/bin/env python3
"""
Example usage of the refactored Powerball prediction system.
This script demonstrates how to use the new modular components.
"""
from main_predictor import AdvancedPowerballPredictor, quick_prediction
def main():
print("=" * 60)
print("POWERBALL PREDICTION SYSTEM - EXAMPLE USAGE")
print("=" * 60)
# Method 1: Quick prediction (simplest way)
print("\n1. QUICK PREDICTION:")
print("-" * 30)
predictions = quick_prediction('powerball.csv', num_predictions=5)
# Method 2: Full system with testing and analysis
print("\n2. COMPREHENSIVE ANALYSIS:")
print("-" * 30)
predictor = AdvancedPowerballPredictor('powerball.csv')
# Generate predictions using different methods
ml_predictions = predictor.generate_predictions(2, method='ml')
pattern_predictions = predictor.generate_predictions(2, method='pattern')
hybrid_predictions = predictor.generate_predictions(3, method='hybrid')
lstm_predictions = predictor.generate_predictions(3, method='lstm')
print(f"Generated predictions using different methods:")
print(f"- ML-based: {len(ml_predictions)}")
print(f"- Pattern-based: {len(pattern_predictions)}")
print(f"- Hybrid: {len(hybrid_predictions)}")
print(f"- LSTM Deep Learning: {len(lstm_predictions)}")
# Test predictions
all_predictions = ml_predictions + pattern_predictions + hybrid_predictions + lstm_predictions
test_results = predictor.test_predictions(all_predictions, test_size=50)
print(f"\nTest Results:")
print(f"- Historical performance score: {test_results['historical']['statistics']['performance_score']:.4f}")
print(f"- Matches found: {sum(test_results['historical']['matches'].values())}")
# Display final predictions
predictor.display_predictions(all_predictions)
# Method 3: Individual component usage
print("\n3. INDIVIDUAL COMPONENT USAGE:")
print("-" * 30)
# Access individual components
data_handler = predictor.data_handler
print(f"Data handler loaded {len(data_handler.data)} draws")
# Access features
features = predictor.prepare_features()
print(f"Feature engineering created {len(features)} feature groups")
# Access models
models = predictor.build_models()
print(f"Built {len(models['white'])} white ball models and {len(models['powerball'])} powerball models")
print("\n" + "=" * 60)
print("EXAMPLE COMPLETED SUCCESSFULLY")
print("=" * 60)
if __name__ == "__main__":
main()