Update classification_model_monitor.py
Browse files
classification_model_monitor.py
CHANGED
|
@@ -21,11 +21,12 @@ def filter_prediction_data(data: pd.DataFrame):
|
|
| 21 |
if data is None:
|
| 22 |
raise Exception("Input Prediction Data frame in None")
|
| 23 |
|
| 24 |
-
# filtered_prediction_data = data.loc[(data['y_true'].isin(['WEATHER', 'EDUCATION', 'ASTROLOGY', 'OTHERS']) == False) &
|
| 25 |
-
# (data['y_pred'].isin(['WEATHER', 'EDUCATION', 'ASTROLOGY', 'OTHERS']) == False) &
|
| 26 |
-
# (data['y_true_proba'] > CLASSIFIER_THRESHOLD)].copy()
|
| 27 |
-
|
| 28 |
filtered_prediction_data = data.loc[data['y_true_proba'] == 1].copy()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
logging.info("Exiting filter_prediction_data()")
|
| 31 |
return filtered_prediction_data
|
|
|
|
| 21 |
if data is None:
|
| 22 |
raise Exception("Input Prediction Data frame in None")
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
filtered_prediction_data = data.loc[data['y_true_proba'] == 1].copy()
|
| 25 |
+
|
| 26 |
+
# filtered_prediction_data = data.loc[(data['y_true_proba'] == 1) & (data['used_for_training'].str.contains("_train")==False) &
|
| 27 |
+
# (data['used_for_training'].str.contains("_excluded")==False) &
|
| 28 |
+
# (data['used_for_training'].str.contains("_validation")==False),
|
| 29 |
+
# ['y_true', 'y_pred']].copy()
|
| 30 |
|
| 31 |
logging.info("Exiting filter_prediction_data()")
|
| 32 |
return filtered_prediction_data
|