microsoft / solution-accelerator-many-models

MIT License
192 stars 87 forks source link

Can forecasting pipeline call forecast_quantiles() as well as forecast()? #125

Closed felixcollins closed 2 years ago

felixcollins commented 3 years ago

I wish to know prediction intervals for the forecasts. Can this be done with many models accelerator? If not can it be added as new functionality or is there a work-around?

felixcollins commented 3 years ago

I just had a look in the runtime code and it seems like there is no way to call forecast_quantiles(). It should be fairly straight forward to add an option to do this though. Can this issue be considered a feature request please?

deeptim123 commented 3 years ago

You are right, currently for AutoML we do not have a way to pass that option. We will track this as a feature request.

felixcollins commented 3 years ago

I've got this working by modifying the ManyModelsInference class and putting it directly in the driver file. See the attatched zip with the updated builder (factory) and driver.

Using the updated builder to get quantiles just needs the extra argument (optional).

    inference_steps = AutoMLPipelineBuilder \
        .get_many_models_batch_inference_steps(experiment=experiment,
                                               inference_data=models_input,
                                             <arguments omitted for clarity>
                                               target_column_name=automl_settings["label_column_name"],
                                               arguments=["--quantiles", "0.1", "0.5", "0.9"])

quantile_forecast_pipeline_builder.zip

If the project was open sourced or I had access to the runtime repo I could make a proper pull request - just saying :-)

deeptim123 commented 3 years ago

We are now supporting forecast_quantile, please update your package and you would be able to use it.