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

Method vote

modAL/models/learners.py:700–714  ·  view source on GitHub ↗

Predicts the values for the supplied data for each regressor in the CommitteeRegressor. Args: X: The samples to cast votes. **predict_kwargs: Keyword arguments to be passed to :meth:`predict` of the learners. Returns: The predicted value f

(self, X: modALinput, **predict_kwargs)

Source from the content-addressed store, hash-verified

698 return np.mean(vote, axis=1), np.std(vote, axis=1)
699
700 def vote(self, X: modALinput, **predict_kwargs):
701 """
702 Predicts the values for the supplied data for each regressor in the CommitteeRegressor.
703 Args:
704 X: The samples to cast votes.
705 **predict_kwargs: Keyword arguments to be passed to :meth:`predict` of the learners.
706 Returns:
707 The predicted value for each regressor in the CommitteeRegressor and each sample in X.
708 """
709 prediction = np.zeros(shape=(len(X), len(self.learner_list)))
710
711 for learner_idx, learner in enumerate(self.learner_list):
712 prediction[:, learner_idx] = learner.predict(X, **predict_kwargs).reshape(-1, )
713
714 return prediction

Callers 2

test_voteMethod · 0.95
predictMethod · 0.95

Calls 1

predictMethod · 0.45

Tested by 1

test_voteMethod · 0.76