Tracy Teal
09/12/2024, 4:44 PMI am trying to compute SHAP values (to gauge feature importances) for Nixtla's Statsforecast (AutoARIMA), AutoMLForecast (rf, linear etc.) and AutoNeuralForecast libraries. I started off by following the tutorial given at (https://nixtlaverse.nixtla.io/mlforecast/docs/how-to-guides/analyzing_models.html) for ML Forecast, however, I am not able to generate the SHAP values properly.
I am using the Auto family of functions, and the error I get is that I am passing a dataframe instead of an integer. I believe that corresponds to how the predict function expects an integer for the horizon. In the shared tutorial, however, a dataframe is being passed instead. Can you please advise on how I need to modify this?
Tracy Teal
09/12/2024, 4:45 PMI figured out the issue - I believe it arises from my passing a MLForecast object as opposed to the model itself when calling the function. Now figuring out how to call the model itself.
Tracy Teal
09/12/2024, 4:46 PMFigured that out too. Just need to understand how to access and use the hyperoptimized parameters (such as lag_features as given in the SS in my last email etc.) when calculating shap_values. Can you please advise how one may do that?
Tracy Teal
09/12/2024, 4:46 PMMarco
09/12/2024, 5:23 PMJosé Morales
09/12/2024, 6:01 PMauto_mlf.models_['linear'].models_['linear']