Last active
June 20, 2022 17:12
-
-
Save prafulgondane/3cee1288a7c0cc4a2d18e57bca890f35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bias_metrics_cv_df = compute_bias_metrics_for_model(df_cv, identity_columns, MODEL_NAME, TOXICITY_COLUMN) | |
print("Overall AUC for Train Data : ", get_final_metric(bias_metrics_train_df, calculate_overall_auc(df_train, MODEL_NAME))) | |
print("#"*100) | |
print("Overall AUC for CV Data : ", get_final_metric(bias_metrics_cv_df, calculate_overall_auc(df_cv, MODEL_NAME))) | |
print("#"*100) | |
print(" Train Data : ") | |
print("#"*100) | |
tr_pred = np.where(df_train[MODEL_NAME] >= 0.5, 1, 0) | |
plot_confusion_matrix(train_labels[:,1], tr_pred) | |
print(" CV Data : ") | |
print("#"*100) | |
cv_pred = np.where(df_cv[MODEL_NAME] >= 0.5, 1, 0) | |
plot_confusion_matrix(cv_labels[:,1], cv_pred) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment