Skip to content

Commit d98d4e7

Browse files
authored
Merge pull request #95564 from trevorbye/master
fixed link and removed old explainability stuff
2 parents f72cdb4 + b2f233d commit d98d4e7

File tree

1 file changed

+3
-67
lines changed

1 file changed

+3
-67
lines changed

articles/machine-learning/service/how-to-auto-train-remote.md

Lines changed: 3 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -148,24 +148,6 @@ automl_config = AutoMLConfig(task='classification',
148148
)
149149
```
150150

151-
### Enable model explanations
152-
153-
Set the optional `model_explainability` parameter in the `AutoMLConfig` constructor. Additionally, a validation dataframe object must be passed as a parameter `X_valid` to use the model explainability feature.
154-
155-
```python
156-
automl_config = AutoMLConfig(task='classification',
157-
debug_log='automl_errors.log',
158-
path=project_folder,
159-
compute_target=compute_target,
160-
run_configuration=run_config,
161-
X = X,
162-
y = y,
163-
**automl_settings,
164-
model_explainability=True,
165-
X_valid=X_test
166-
)
167-
```
168-
169151
## Submit training experiment
170152

171153
Now submit the configuration to automatically select the algorithm, hyper parameters, and train the model.
@@ -234,59 +216,13 @@ remote_run.get_portal_url()
234216

235217
The same information is available in your workspace. To learn more about these results, see [Understand automated machine learning results](how-to-understand-automated-ml.md).
236218

237-
### View logs
238-
239-
Find logs on the DSVM under `/tmp/azureml_run/{iterationid}/azureml-logs`.
240-
241-
## <a name="explain"></a> Best model explanation
242-
243-
Retrieving model explanation data allows you to see detailed information about the models to increase transparency into what's running on the back-end. In this example, you run model explanations only for the best fit model. If you run for all models in the pipeline, it will result in significant run time. Model explanation information includes:
244-
245-
* shap_values: The explanation information generated by shap lib.
246-
* expected_values: The expected value of the model applied to set of X_train data.
247-
* overall_summary: The model level feature importance values sorted in descending order.
248-
* overall_imp: The feature names sorted in the same order as in overall_summary.
249-
* per_class_summary: The class level feature importance values sorted in descending order. Only available for the classification case.
250-
* per_class_imp: The feature names sorted in the same order as in per_class_summary. Only available for the classification case.
251-
252-
Use the following code to select the best pipeline from your iterations. The `get_output` method returns the best run and the fitted model for the last fit invocation.
253-
254-
```python
255-
best_run, fitted_model = remote_run.get_output()
256-
```
257-
258-
Import the `retrieve_model_explanation` function and run on the best model.
259-
260-
```python
261-
from azureml.train.automl.automlexplainer import retrieve_model_explanation
262-
263-
shap_values, expected_values, overall_summary, overall_imp, per_class_summary, per_class_imp = \
264-
retrieve_model_explanation(best_run)
265-
```
266-
267-
Print results for the `best_run` explanation variables you want to view.
268-
269-
```python
270-
print(overall_summary)
271-
print(overall_imp)
272-
print(per_class_summary)
273-
print(per_class_imp)
274-
```
275-
276-
Printing the `best_run` explanation summary variables results in the following output.
277-
278-
![Model explainability console output](./media/how-to-auto-train-remote/expl-print.png)
279-
280-
You can also visualize feature importance through the widget UI, or in your workspace in [Azure Machine Learning studio](https://ml.azure.com).
281-
282-
![Model explainability UI](./media/how-to-auto-train-remote/model-exp.png)
283-
284219
## Example
285220

286-
The [how-to-use-azureml/automated-machine-learning/remote-amlcompute/auto-ml-remote-amlcompute.ipynb](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/remote-amlcompute/auto-ml-remote-amlcompute.ipynb) notebook demonstrates concepts in this article.
221+
The following [notebook](https://github.com/Azure/MachineLearningNotebooks/blob/master/how-to-use-azureml/automated-machine-learning/regression/auto-ml-regression.ipynb) demonstrates concepts in this article.
287222

288223
[!INCLUDE [aml-clone-in-azure-notebook](../../../includes/aml-clone-for-examples.md)]
289224

290225
## Next steps
291226

292-
Learn [how to configure settings for automatic training](how-to-configure-auto-train.md).
227+
* Learn [how to configure settings for automatic training](how-to-configure-auto-train.md).
228+
* See the [how-to](how-to-machine-learning-interpretability-automl.md) on enabling model interpretability features in automated ML experiments.

0 commit comments

Comments
 (0)