(self)
| 1447 | ) |
| 1448 | |
| 1449 | def test_vote_proba(self): |
| 1450 | for n_samples in range(1, 100): |
| 1451 | for n_learners in range(1, 10): |
| 1452 | for n_classes in range(1, 10): |
| 1453 | vote_proba_output = np.random.rand( |
| 1454 | n_samples, n_learners, n_classes) |
| 1455 | # assembling the mock learners |
| 1456 | learner_list = [mock.MockActiveLearner( |
| 1457 | predict_proba_return=vote_proba_output[:, |
| 1458 | learner_idx, :], |
| 1459 | predictor=mock.MockEstimator( |
| 1460 | classes_=list(range(n_classes))) |
| 1461 | ) for learner_idx in range(n_learners)] |
| 1462 | committee = modAL.models.learners.Committee( |
| 1463 | learner_list=learner_list) |
| 1464 | np.testing.assert_almost_equal( |
| 1465 | committee.vote_proba(np.random.rand(n_samples, 1)), |
| 1466 | vote_proba_output |
| 1467 | ) |
| 1468 | |
| 1469 | def test_teach(self): |
| 1470 | X_training = np.random.rand(10, 2) |
nothing calls this directly
no test coverage detected