Skip to content

Instantly share code, notes, and snippets.

@kingabzpro
Last active October 14, 2022 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingabzpro/cbf2680897ce01d8ce6b090553b405a6 to your computer and use it in GitHub Desktop.
Save kingabzpro/cbf2680897ce01d8ce6b090553b405a6 to your computer and use it in GitHub Desktop.
Ensemble Learning with examples: Weighted Average
pred_final = np.round(0.3*pred_1 + 0.6*pred_2 + 0.1*pred_3)
# evalution
accuracy = round(accuracy_score(y_test, pred_final) * 100, 3)
auc = round(roc_auc_score(y_test, pred_final), 3)
print(f" Accuracy: {accuracy}%")
print(f" AUC score: {auc}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment