def test_roc(dummy_classifier): (nb, x_train, y_train, x_test, y_test, y_pred, y_probas) = dummy_classifier lc_table = learning_curve(nb, x_train, y_train) r = roc(y_test, y_probas) assert (r.value.data[0] == [0, 0.0, 0.0])
def test_learning_curve(dummy_classifier): (nb, x_train, y_train, x_test, y_test, y_pred, y_probas) = dummy_classifier lc_table = learning_curve(nb, x_train, y_train) assert (len(lc_table.value.data) == 10) assert (lc_table.value.data[0][0] == 'train') assert (lc_table.value.data[1][0] == 'test')