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

Method test_score

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

Source from the content-addressed store, hash-verified

1038 )
1039
1040 def test_score(self):
1041 test_cases = (np.random.rand() for _ in range(10))
1042 for score_return in test_cases:
1043 mock_classifier = mock.MockEstimator(score_return=score_return)
1044 learner = modAL.models.learners.ActiveLearner(
1045 mock_classifier, mock.MockFunction(None))
1046 np.testing.assert_almost_equal(
1047 learner.score(np.random.rand(5, 2), np.random.rand(5, )),
1048 score_return
1049 )
1050
1051 def test_teach(self):
1052 X_training = np.random.rand(10, 2)

Callers

nothing calls this directly

Calls 1

scoreMethod · 0.45

Tested by

no test coverage detected