-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_all_examples.py
More file actions
86 lines (76 loc) · 2.87 KB
/
run_all_examples.py
File metadata and controls
86 lines (76 loc) · 2.87 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env python3
"""
Runner script to execute all ML examples
"""
import subprocess
import sys
import os
def run_script(script_name):
"""
Run a Python script and handle errors
"""
print(f"\n{'='*60}")
print(f"🚀 RUNNING {script_name.upper()}")
print(f"{'='*60}")
try:
result = subprocess.run([sys.executable, script_name],
capture_output=True, text=True, timeout=300)
if result.returncode == 0:
print(f"✅ {script_name} completed successfully!")
print("Output:")
print(result.stdout[-500:]) # Show last 500 characters of output
else:
print(f"❌ {script_name} failed with error:")
print(result.stderr)
except subprocess.TimeoutExpired:
print(f"⏰ {script_name} timed out after 5 minutes")
except Exception as e:
print(f"❌ Error running {script_name}: {e}")
def main():
"""
Main function to run all ML examples
"""
print("🤖 WELCOME TO THE ULTIMATE ML EXAMPLE SUITE")
print("=" * 60)
print("This script will run all machine learning examples in sequence.")
print("Estimated time: 10-15 minutes depending on your system.")
print("=" * 60)
# List of scripts to run in order
scripts = [
"ml_example.py",
"advanced_ml_example.py",
"neural_network_example.py",
"comprehensive_ml_suite.py",
"automl_pipeline.py"
]
# Check if all scripts exist
missing_scripts = []
for script in scripts:
if not os.path.exists(script):
missing_scripts.append(script)
if missing_scripts:
print(f"❌ Missing scripts: {missing_scripts}")
print("Please make sure all ML example files are in the current directory.")
return
# Run each script
for script in scripts:
run_script(script)
print("\n" + "=" * 60)
print("🎉 ALL ML EXAMPLES COMPLETED!")
print("=" * 60)
print("\n📚 Summary of what you've learned:")
print("• Basic ML classification with scikit-learn")
print("• Advanced ML with multiple algorithms and evaluation techniques")
print("• Neural networks with TensorFlow/Keras")
print("• Comprehensive ML suite with clustering and anomaly detection")
print("• Automated ML pipeline with hyperparameter tuning")
print("\n🔧 Key techniques covered:")
print(" - Data preprocessing and feature engineering")
print(" - Model selection and evaluation")
print(" - Cross-validation and hyperparameter tuning")
print(" - Visualization and model interpretability")
print(" - Classification, regression, clustering, and anomaly detection")
print(" - Deep learning and automated machine learning")
print("\n🎓 You now have a comprehensive understanding of ML workflows!")
if __name__ == "__main__":
main()