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

Method test_predict_proba

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

Source from the content-addressed store, hash-verified

1001 )
1002
1003 def test_predict_proba(self):
1004 for n_samples in range(1, 100):
1005 for n_features in range(1, 10):
1006 X = np.random.rand(n_samples, n_features)
1007 predict_proba_return = np.random.randint(
1008 0, 2, size=(n_samples,))
1009 mock_classifier = mock.MockEstimator(
1010 predict_proba_return=predict_proba_return)
1011 learner = modAL.models.learners.ActiveLearner(
1012 estimator=mock_classifier
1013 )
1014 np.testing.assert_equal(
1015 learner.predict_proba(X),
1016 predict_proba_return
1017 )
1018
1019 def test_query(self):
1020 for n_samples in range(1, 100):

Callers

nothing calls this directly

Calls 1

predict_probaMethod · 0.45

Tested by

no test coverage detected