forked from victorgabr/ApertureComplexity
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathml_classification.log
More file actions
163 lines (146 loc) · 6.88 KB
/
ml_classification.log
File metadata and controls
163 lines (146 loc) · 6.88 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
Training all models...
Training Logistic Regression model...
Logistic Regression trained successfully. Recall: 0.7778
Training Random Forest model...
Random Forest trained successfully. Recall: 0.4444
Training XGBoost model...
XGBoost trained successfully. Recall: 0.3333
Best model: Logistic Regression with score: 0.7778
==== MODEL TRAINING RESULTS ====
Logistic Regression Results (Failure Detection Focus):
Accuracy: 0.7778
Recall (Failure Class): 1.0000
Precision (Failure Class): 0.0769
F1 Score (Failure Class): 0.1429
Confusion Matrix:
[[ 9 0]
[108 2]]
Classification Report:
precision recall f1-score support
0 0.08 1.00 0.14 9
1 1.00 0.02 0.04 110
accuracy 0.09 119
macro avg 0.54 0.51 0.09 119
weighted avg 0.93 0.09 0.04 119
Random Forest Results (Failure Detection Focus):
Accuracy: 0.4444
Recall (Failure Class): 1.0000
Precision (Failure Class): 0.0763
F1 Score (Failure Class): 0.1417
Confusion Matrix:
[[ 9 0]
[109 1]]
Classification Report:
precision recall f1-score support
0 0.08 1.00 0.14 9
1 1.00 0.01 0.02 110
accuracy 0.08 119
macro avg 0.54 0.50 0.08 119
weighted avg 0.93 0.08 0.03 119
XGBoost Results (Failure Detection Focus):
Accuracy: 0.3333
Recall (Failure Class): 1.0000
Precision (Failure Class): 0.0763
F1 Score (Failure Class): 0.1417
Confusion Matrix:
[[ 9 0]
[109 1]]
Classification Report:
precision recall f1-score support
0 0.08 1.00 0.14 9
1 1.00 0.01 0.02 110
accuracy 0.08 119
macro avg 0.54 0.50 0.08 119
weighted avg 0.93 0.08 0.03 119
Random Forest Feature Importances:
Feature Importance
0 PyComplexityMetric 0.356174
2 AreaMetricEstimator 0.266177
1 MeanAreaMetricEstimator 0.208418
3 ApertureIrregularityMetric 0.169231
XGBoost Feature Importances:
Feature Importance
0 PyComplexityMetric 0.318976
2 AreaMetricEstimator 0.264133
1 MeanAreaMetricEstimator 0.224519
3 ApertureIrregularityMetric 0.192372
==== THRESHOLD OPTIMIZATION ====
Threshold 0.00: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.05: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.10: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.15: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.20: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.25: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.30: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.35: Recall 0.1111, Precision 0.0175, F1 0.0303
Threshold 0.40: Recall 0.1111, Precision 0.0128, F1 0.0230
Threshold 0.45: Recall 0.2222, Precision 0.0220, F1 0.0400
Threshold 0.50: Recall 0.2222, Precision 0.0213, F1 0.0388
Threshold 0.55: Recall 0.3333, Precision 0.0303, F1 0.0556
Threshold 0.60: Recall 0.4444, Precision 0.0392, F1 0.0721
Threshold 0.65: Recall 0.4444, Precision 0.0392, F1 0.0721
Threshold 0.70: Recall 0.5556, Precision 0.0476, F1 0.0877
Threshold 0.75: Recall 0.6667, Precision 0.0545, F1 0.1008
Threshold 0.80: Recall 0.7778, Precision 0.0625, F1 0.1157
Threshold 0.85: Recall 0.8889, Precision 0.0696, F1 0.1290
Threshold 0.90: Recall 1.0000, Precision 0.0769, F1 0.1429
Threshold 0.95: Recall 1.0000, Precision 0.0763, F1 0.1417
Best threshold for recall: 0.90 (recall = 1.0000)
Saving models to models\20250313_170347...
Saved Logistic Regression with optimized threshold: 0.9000
Saved Random Forest with optimized threshold: 0.7000
Saved XGBoost with optimized threshold: 0.8000
Saved model metadata to models\20250313_170347\metadata.json
Threshold 0.00: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.05: Recall 0.1111, Precision 0.0127, F1 0.0227
Threshold 0.10: Recall 0.2222, Precision 0.0202, F1 0.0370
Threshold 0.15: Recall 0.3333, Precision 0.0283, F1 0.0522
Threshold 0.20: Recall 0.4444, Precision 0.0370, F1 0.0684
Threshold 0.25: Recall 0.5556, Precision 0.0455, F1 0.0840
Threshold 0.30: Recall 0.5556, Precision 0.0450, F1 0.0833
Threshold 0.35: Recall 0.5556, Precision 0.0450, F1 0.0833
Threshold 0.40: Recall 0.5556, Precision 0.0450, F1 0.0833
Threshold 0.45: Recall 0.5556, Precision 0.0450, F1 0.0833
Threshold 0.50: Recall 0.5556, Precision 0.0450, F1 0.0833
Threshold 0.55: Recall 0.5556, Precision 0.0442, F1 0.0820
Threshold 0.60: Recall 0.6667, Precision 0.0522, F1 0.0968
Threshold 0.65: Recall 0.7778, Precision 0.0603, F1 0.1120
Threshold 0.70: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.75: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.80: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.85: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.90: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.95: Recall 1.0000, Precision 0.0756, F1 0.1406
Best threshold for recall: 0.70 (recall = 1.0000)
Saving models to models\20250313_170348...
Saved Logistic Regression with optimized threshold: 0.9000
Saved Random Forest with optimized threshold: 0.7000
Saved XGBoost with optimized threshold: 0.8000
Saved model metadata to models\20250313_170348\metadata.json
Threshold 0.00: Recall 0.0000, Precision 0.0000, F1 0.0000
Threshold 0.05: Recall 0.5556, Precision 0.0442, F1 0.0820
Threshold 0.10: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.15: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.20: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.25: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.30: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.35: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.40: Recall 0.5556, Precision 0.0439, F1 0.0813
Threshold 0.45: Recall 0.6667, Precision 0.0522, F1 0.0968
Threshold 0.50: Recall 0.6667, Precision 0.0522, F1 0.0968
Threshold 0.55: Recall 0.6667, Precision 0.0522, F1 0.0968
Threshold 0.60: Recall 0.6667, Precision 0.0522, F1 0.0968
Threshold 0.65: Recall 0.7778, Precision 0.0603, F1 0.1120
Threshold 0.70: Recall 0.8889, Precision 0.0684, F1 0.1270
Threshold 0.75: Recall 0.8889, Precision 0.0684, F1 0.1270
Threshold 0.80: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.85: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.90: Recall 1.0000, Precision 0.0763, F1 0.1417
Threshold 0.95: Recall 1.0000, Precision 0.0763, F1 0.1417
Best threshold for recall: 0.80 (recall = 1.0000)
Saving models to models\20250313_170349...
Saved Logistic Regression with optimized threshold: 0.9000
Saved Random Forest with optimized threshold: 0.7000
Saved XGBoost with optimized threshold: 0.8000
Saved model metadata to models\20250313_170349\metadata.json
Analysis complete.