MCPcopy Create free account
hub / github.com/modAL-python/modAL / test_predict

Method test_predict

tests/core_tests.py:988–1001  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

986 ValueError, learner._add_training_data, X_new, y_new)
987
988 def test_predict(self):
989 for n_samples in range(1, 100):
990 for n_features in range(1, 10):
991 X = np.random.rand(n_samples, n_features)
992 predict_return = np.random.randint(0, 2, size=(n_samples, ))
993 mock_classifier = mock.MockEstimator(
994 predict_return=predict_return)
995 learner = modAL.models.learners.ActiveLearner(
996 estimator=mock_classifier
997 )
998 np.testing.assert_equal(
999 learner.predict(X),
1000 predict_return
1001 )
1002
1003 def test_predict_proba(self):
1004 for n_samples in range(1, 100):

Callers

nothing calls this directly

Calls 1

predictMethod · 0.45

Tested by

no test coverage detected