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

Method test_sklearn

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

Source from the content-addressed store, hash-verified

1087 pass
1088
1089 def test_sklearn(self):
1090 learner = modAL.models.learners.ActiveLearner(
1091 estimator=RandomForestClassifier(n_estimators=10),
1092 X_training=np.random.rand(10, 10),
1093 y_training=np.random.randint(0, 2, size=(10,))
1094 )
1095 learner.fit(np.random.rand(10, 10),
1096 np.random.randint(0, 2, size=(10,)))
1097 pred = learner.predict(np.random.rand(10, 10))
1098 learner.predict_proba(np.random.rand(10, 10))
1099 confusion_matrix(pred, np.random.randint(0, 2, size=(10,)))
1100
1101 def test_sparse_matrices(self):
1102 query_strategies = [

Callers

nothing calls this directly

Calls 3

fitMethod · 0.95
predictMethod · 0.45
predict_probaMethod · 0.45

Tested by

no test coverage detected