Skip to content

Commit 0d10f7b

Browse files
committed
update test to include predict_proba
1 parent 93d9a53 commit 0d10f7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/test_automl/test_estimators.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ def test_fit_pSMAC(self):
103103
initial_configurations_via_metalearning=0,
104104
ensemble_size=0)
105105
automl.fit(X_train, Y_train)
106-
107106
# Create a 'dummy model' for the first run, which has an accuracy of
108107
# more than 99%; it should be in the final ensemble if the ensemble
109108
# building of the second AutoSklearn classifier works correct
@@ -303,6 +302,8 @@ def test_multilabel(self):
303302
self.assertEqual(predictions.shape, (50, 3))
304303
score = f1_macro(Y_test, predictions)
305304
self.assertGreaterEqual(score, 0.9)
305+
probs = automl.predict_proba(X_train)
306+
self.assertAlmostEqual(np.mean(probs), 0.33333333333333331)
306307

307308
def test_binary(self):
308309
output = os.path.join(self.test_dir, '..', '.tmp_binary_fit')
@@ -376,4 +377,4 @@ def test_conversion_of_list_to_np(self, fit_ensemble, refit, fit):
376377
self.assertIsInstance(refit.call_args[0][1], np.ndarray)
377378
automl.fit_ensemble(y)
378379
self.assertEqual(fit_ensemble.call_count, 1)
379-
self.assertIsInstance(fit_ensemble.call_args[0][0], np.ndarray)
380+
self.assertIsInstance(fit_ensemble.call_args[0][0], np.ndarray)

0 commit comments

Comments
 (0)