Created
February 21, 2021 19:05
-
-
Save eugeneyan/89aef2bcac45def376daabc3cfe48cd2 to your computer and use it in GitHub Desktop.
Test output
This file contains hidden or 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_output_shape(dummy_titanic): | |
X_train, y_train, X_test, y_test = dummy_titanic | |
dt = DecisionTree() | |
dt.fit(X_train, y_train) | |
pred_train = dt.predict(X_train) | |
pred_test = dt.predict(X_test) | |
assert pred_train.shape == (X_train.shape[0],), 'DecisionTree output should be same as training labels.' | |
assert pred_test.shape == (X_test.shape[0],), 'DecisionTree output should be same as testing labels.' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment