Mercurial > hg > plosone_underreview
diff tests/test_classification.py @ 58:d118b6ca8370 branch-tests
some changes in classification with random train/test split
author | Maria Panteli <m.x.panteli@gmail.com> |
---|---|
date | Thu, 21 Sep 2017 15:24:18 +0100 |
parents | e8084526f7e5 |
children | f9513664fe42 |
line wrap: on
line diff
--- a/tests/test_classification.py Tue Sep 19 21:28:06 2017 +0100 +++ b/tests/test_classification.py Thu Sep 21 15:24:18 2017 +0100 @@ -19,7 +19,7 @@ X[-50:, :] = X[-50:, :] + 10 Y = np.concatenate([np.repeat('a', 50), np.repeat('b', 50)]) X_train, X_test, Y_train, Y_test = train_test_split(X, Y, train_size=0.6, random_state=1, stratify=Y) - accuracy, predictions = classification.confusion_matrix(X_train, Y_train, X_test, Y_test) + accuracy, _ = classification.confusion_matrix(X_train, Y_train, X_test, Y_test) # expect perfect accuracy for this 'easy' dataset assert accuracy == 1.0