Get features of a trained model with explain_molde in AutoML
Hi everyone,
I created a time-series model with AutoML in Azure. From the best_run and fitted_model, I can get the feature name and the importance of each feature with azureml.train.automl.automlexplainer.
Here is the link I follow up the get information from the model (https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/model-explanation/auto-ml-model-explanation.ipynb).
I thought that I can get it from shap_values, expected_values returned from retrieve_model_explanation/explain_model. But it's strange to me.
Is this the right way to get all features used in the trained model (not only the feature name but also the value of each feature)?
You're looking at the correct notebook. The following cell will allow you to retrieve shap_values, expected values:
from azureml.train.automl.automlexplainer import retrieve_model_explanation
shap_values, expected_values, overall_summary, overall_imp, per_class_summary, per_class_imp =
retrieve_model_explanation(best_run)