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

Method test_vote

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

Source from the content-addressed store, hash-verified

1552 )
1553
1554 def test_vote(self):
1555 for n_members in range(1, 10):
1556 for n_instances in range(1, 100):
1557 vote_output = np.random.rand(n_instances, n_members)
1558 # assembling the Committee
1559 learner_list = [mock.MockActiveLearner(predict_return=vote_output[:, member_idx])
1560 for member_idx in range(n_members)]
1561 committee = modAL.models.learners.CommitteeRegressor(
1562 learner_list=learner_list)
1563 np.testing.assert_array_almost_equal(
1564 committee.vote(np.random.rand(n_instances).reshape(-1, 1)),
1565 vote_output
1566 )
1567
1568 def test_on_transformed(self):
1569 n_samples = 10

Callers

nothing calls this directly

Calls 1

voteMethod · 0.95

Tested by

no test coverage detected