cv_score_av = round( np.mean(cross_val_score(ml_10_svm, x_10, y_10, cv=skf)) * 100, 1) print('Cross-Validation Accuracy Score ML10: ', cv_score_av, '%\n') cv_score_av = round( np.mean(cross_val_score(ml_5_svm, x_5, y_5, cv=skf)) * 100, 1) print('Cross-Validation Accuracy Score ML5: ', cv_score_av, '%\n') # ---------- PREDICTION PROBABILITY PLOTS ---------- if pred_prob_plot_df10: fig = pred_proba_plot(ml_10_svm, x_10, y_10, no_iter=50, no_bins=35, x_min=0.3, classifier='Support Vector Machine (ml_10)') if save_pred_prob_plot_df10: fig.savefig('figures/ml_10_svm_pred_proba.png') if pred_prob_plot_df5: fig = pred_proba_plot(ml_5_svm, x_5, y_5, no_iter=50, no_bins=35, x_min=0.3, classifier='Support Vector Machine (ml_5)') if save_pred_prob_plot_df5:
cv_score_av = round( np.mean(cross_val_score(ml_10_rand_forest, x_10, y_10, cv=skf)) * 100, 1) print('Cross-Validation Accuracy Score ML10: ', cv_score_av, '%\n') cv_score_av = round( np.mean(cross_val_score(ml_5_rand_forest, x_5, y_5, cv=skf)) * 100, 1) print('Cross-Validation Accuracy Score ML5: ', cv_score_av, '%\n') # ---------- PREDICTION PROBABILITY PLOTS ---------- if pred_prob_plot_df10: fig = pred_proba_plot(ml_10_rand_forest, x_10, y_10, no_iter=50, no_bins=36, x_min=0.3, classifier='Random Forest (ml_10)') if save_pred_prob_plot_df10: fig.savefig('figures/ml_10_random_forest_pred_proba.png') if pred_prob_plot_df5: fig = pred_proba_plot(ml_5_rand_forest, x_5, y_5, no_iter=50, no_bins=35, x_min=0.3, classifier='Random Forest (ml_5)') if save_pred_prob_plot_df5:
cv_score_av = round( np.mean(cross_val_score(ml_10_knn, x_10, y_10, cv=skf)) * 100, 1) print('Cross-Validation Accuracy Score ML10: ', cv_score_av, '%\n') cv_score_av = round( np.mean(cross_val_score(ml_5_knn, x_5, y_5, cv=skf)) * 100, 1) print('Cross-Validation Accuracy Score ML5: ', cv_score_av, '%\n') # ---------- PREDICTION PROBABILITY PLOTS ---------- if pred_prob_plot_df10: fig = pred_proba_plot(ml_10_knn, x_10, y_10, no_iter=50, no_bins=18, x_min=0.3, classifier='Nearest Neighbor (ml_10)') if save_pred_prob_plot_df10: fig.savefig('figures/ml_10_nearest_neighbor_pred_proba.png') if pred_prob_plot_df5: fig = pred_proba_plot(ml_5_knn, x_5, y_5, no_iter=50, no_bins=18, x_min=0.3, classifier='Nearest Neighbor (ml_5)') if save_pred_prob_plot_df10: