Created
February 21, 2021 19:13
-
-
Save eugeneyan/920bd9ee4f2c9c60de3154089faf5b72 to your computer and use it in GitHub Desktop.
Test evaluation
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
def test_dt_evaluation(dummy_titanic_dt, dummy_titanic): | |
model = dummy_titanic_dt | |
X_train, y_train, X_test, y_test = dummy_titanic | |
pred_test = model.predict(X_test) | |
pred_test_binary = np.round(pred_test) | |
acc_test = accuracy_score(y_test, pred_test_binary) | |
auc_test = roc_auc_score(y_test, pred_test) | |
assert acc_test > 0.82, 'Accuracy on test should be > 0.82' | |
assert auc_test > 0.84, 'AUC ROC on test should be > 0.84' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment