Predicts the values of the samples by averaging the prediction of each regressor. Args: X: The samples to be predicted. **predict_kwargs: Keyword arguments to be passed to the :meth:`vote` method of the CommitteeRegressor. Returns: The pre
(self, X: modALinput, return_std: bool = False, **predict_kwargs)
| 683 | super().__init__(learner_list, query_strategy, on_transformed) |
| 684 | |
| 685 | def predict(self, X: modALinput, return_std: bool = False, **predict_kwargs) -> Any: |
| 686 | """ |
| 687 | Predicts the values of the samples by averaging the prediction of each regressor. |
| 688 | Args: |
| 689 | X: The samples to be predicted. |
| 690 | **predict_kwargs: Keyword arguments to be passed to the :meth:`vote` method of the CommitteeRegressor. |
| 691 | Returns: |
| 692 | The predicted class labels for X. |
| 693 | """ |
| 694 | vote = self.vote(X, **predict_kwargs) |
| 695 | if not return_std: |
| 696 | return np.mean(vote, axis=1) |
| 697 | else: |
| 698 | return np.mean(vote, axis=1), np.std(vote, axis=1) |
| 699 | |
| 700 | def vote(self, X: modALinput, **predict_kwargs): |
| 701 | """ |