Skip to content

Implement predict in ensembles #959

Closed
Mr-Geekman opened this issue Sep 26, 2022 · 1 comment
Closed

Implement predict in ensembles #959

Mr-Geekman opened this issue Sep 26, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Mr-Geekman
Copy link
Contributor

Mr-Geekman commented Sep 26, 2022

🚀 Feature Request

We should add predict method into ensembles.

Proposal

  1. Implement EnsembleMixin._predict_pipeline.
  2. Implement VotingEnsemble._predict: look at VotingEnsemble._forecast for inspiration.
  3. Implement StackingEnsemble._predict
    1. Extract all logic with construction of answer in forecast into another method.
    2. Implement predict similar to forecast with preparing predictions and calling method for construct the answer.
  4. Implement DirectEnsemble._predict: it should make prediction with a model with the smallest horizon.

Test cases

  1. VotingEnsemble:
    1. Add test_predict_interface, look at test_forecast_interface for reference.
    2. Add test_predict_prediction_interval_interface, look at test_forecast_prediction_interval_interface for reference.
    3. Change tests test_forecast_values_default_weights and test_forecast_values_custom_weights to test _vote instead of `forecast.
    4. Add test on forecast calling _vote.
    5. Add test on predict calling _vote.
  2. StackingEnsemble
    1. Add test_predict_interface, look at test_forecast_interface for reference.
    2. Add test_predict_prediction_interval_interface, look at test_forecast_prediction_interval_interface for reference.
    3. Add test_predict_values, look at test_forecast for reference.
    4. Transform test_forecast_raise_error_if_not_fitted into test that tests both forecast and predict using pytest.mark.parametrize.
  3. DirectEnsemble: test that predict uses model with the smallest horizon.

Additional context

Is blocked by #958.

@Mr-Geekman Mr-Geekman added the enhancement New feature or request label Sep 26, 2022
@Mr-Geekman Mr-Geekman added this to the Inference milestone Sep 26, 2022
@Mr-Geekman Mr-Geekman self-assigned this Sep 29, 2022
@Mr-Geekman
Copy link
Contributor Author

Closed by #972.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant