Skip to content

Commit f7facd9

Browse files
committed
Merge branch 'master' of https://github.com/MicrosoftDocs/azure-docs-pr into update-images
2 parents 78a5069 + bcbbd37 commit f7facd9

12 files changed

+71
-40
lines changed

articles/azure-monitor/platform/itsmc-connections.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,11 +180,12 @@ The following sections provide details about how to connect your ServiceNow prod
180180
### Prerequisites
181181
Ensure the following prerequisites are met:
182182
- ITSMC installed. More information: [Adding the IT Service Management Connector Solution](../../azure-monitor/platform/itsmc-overview.md#adding-the-it-service-management-connector-solution).
183-
- ServiceNow supported versions: London, Kingston, Jakarta, Istanbul, Helsinki, Geneva.
183+
- ServiceNow supported versions: Madrid, London, Kingston, Jakarta, Istanbul, Helsinki, Geneva.
184184

185185
**ServiceNow Admins must do the following in their ServiceNow instance**:
186186
- Generate client ID and client secret for the ServiceNow product. For information on how to generate client ID and secret, see the following information as required:
187187

188+
- [Set up OAuth for Madrid](https://docs.servicenow.com/bundle/madrid-platform-administration/page/administer/security/task/t_SettingUpOAuth.html)
188189
- [Set up OAuth for London](https://docs.servicenow.com/bundle/london-platform-administration/page/administer/security/task/t_SettingUpOAuth.html)
189190
- [Set up OAuth for Kingston](https://docs.servicenow.com/bundle/kingston-platform-administration/page/administer/security/task/t_SettingUpOAuth.html)
190191
- [Set up OAuth for Jakarta](https://docs.servicenow.com/bundle/jakarta-platform-administration/page/administer/security/task/t_SettingUpOAuth.html)

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,8 @@ RunDetails(local_run).show()
481481
```
482482
![feature importance graph](./media/how-to-configure-auto-train/feature-importance.png)
483483

484+
For more information on how model explanations and feature importance can be enabled in other areas of the SDK outside of automated machine learning, see the [concept](machine-learning-interpretability-explainability.md) article on interpretability.
485+
484486
## Next steps
485487

486488
Learn more about [how and where to deploy a model](how-to-deploy-and-where.md).

articles/machine-learning/service/machine-learning-interpretability-explainability.md

Lines changed: 58 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -10,38 +10,42 @@ ms.topic: conceptual
1010
ms.author: mesameki
1111
author: mesameki
1212
ms.reviewer: larryfr
13-
ms.date: 04/29/2019
13+
ms.date: 05/30/2019
1414
---
1515

1616
# Model interpretability with Azure Machine Learning service
1717

18-
In this article, you will learn how to explain why your model made the predictions it did with the interpretability package of the Azure Machine Learning Python SDK.
18+
In this article, you learn how to explain why your model made the predictions it did with the various interpretability packages of the Azure Machine Learning Python SDK.
1919

20-
Using the classes and methods in this package, you can get:
21-
+ Interpretability on real-world datasets at scale, during training and inference.
20+
Using the classes and methods in the SDK, you can get:
21+
+ Feature importance values for both raw and engineered features
22+
+ Interpretability on real-world datasets at scale, during training and inference.
2223
+ Interactive visualizations to aid you in the discovery of patterns in data and explanations at training time
23-
+ Feature importance values: both raw and engineered features
2424

25-
During the training phase of the development cycle, model designers and evaluators can use to explain the output of a model to stakeholders to build trust. They also use the insights into the model for debugging, validating model behavior matches their objectives, and to check for bias.
25+
During the training phase of the development cycle, model designers and evaluators can use interpretability output of a model to verify hypotheses and build trust with stakeholders. They also use the insights into the model for debugging, validating model behavior matches their objectives, and to check for bias.
2626

27-
Inference, or model scoring, is the phase where the deployed model is used for prediction, most commonly on production data. During this phase, data scientists can explain the resulting predictions to the people who use your model. For example, why did the model deny a mortgage loan, or predict that an investment portfolio carries a higher risk?
27+
In machine learning, **features** are the data fields used to predict a target data point. For example,
28+
to predict credit risk, data fields for age, account size, and account age might be used. In this case,
29+
age, account size, and account age are **features**. Feature importance tells you how each data field affected the model's predictions. For example, age may be heavily used in the prediction while account size and age don't affect the prediction accuracy significantly. This process allows data scientists to explain resulting predictions, so that stakeholders have visibility into what data points are most important in the model.
2830

29-
Using these offering, you can explain machine learning models **globally on all data**, or **locally on a specific data point** using the state-of-art technologies in an easy-to-use and scalable fashion.
31+
Using these tools, you can explain machine learning models **globally on all data**, or **locally on a specific data points** using the state-of-art technologies in an easy-to-use and scalable fashion.
3032

31-
The interpretability classes are made available through two Python packages. Learn how to [install SDK packages for Azure Machine Learning](https://docs.microsoft.com/python/api/overview/azure/ml/install?view=azure-ml-py).
33+
The interpretability classes are made available through multiple SDK packages. Learn how to [install SDK packages for Azure Machine Learning](https://docs.microsoft.com/python/api/overview/azure/ml/install?view=azure-ml-py).
3234

33-
* [`azureml.explain.model`](https://docs.microsoft.com/python/api/azureml-explain-model/?view=azure-ml-py), the main package, containing functionalities supported by Microsoft.
35+
* [`azureml.explain.model`](https://docs.microsoft.com/python/api/azureml-explain-model/?view=azure-ml-py), the main package, containing functionalities supported by Microsoft.
3436

3537
* `azureml.contrib.explain.model`, preview, and experimental functionalities that you can try.
3638

39+
* `azureml.train.automl.automlexplainer` package for interpreting automated machine learning models.
40+
3741
> [!IMPORTANT]
38-
> Things in contrib are not fully supported. As the experimental functionalities become mature, they will gradually be moved to the main package.
42+
> Content in the `contrib` namespace is not fully supported. As the experimental functionalities become mature, they will gradually be moved to the main namespace.
3943
4044
## How to interpret your model
4145

4246
You can apply the interpretability classes and methods to understand the model’s global behavior or specific predictions. The former is called global explanation and the latter is called local explanation.
4347

44-
The methods can be also categorized based on whether the method is model agnostic or model specific. Some methods target certain type of models. For example, SHAP’s tree explainer only applies to tree-based models. Some methods treat the model as a black box, such as mimic explainer or SHAP’s kernel explainer. The `explain` package leverages these different approaches based on data sets, model types, and use cases.
48+
The methods can be also categorized based on whether the method is model agnostic or model specific. Some methods target certain type of models. For example, SHAP’s tree explainer only applies to tree-based models. Some methods treat the model as a black box, such as mimic explainer or SHAP’s kernel explainer. The `explain` package leverages these different approaches based on data sets, model types, and use cases.
4549

4650
The output is a set of information on how a given model makes its prediction, such as:
4751
* Global/local relative feature importance
@@ -99,7 +103,7 @@ The `explain` package is designed to work with both local and remote compute tar
99103

100104
### Train and explain locally
101105

102-
1. Train your model in a local Jupyter notebook.
106+
1. Train your model in a local Jupyter notebook.
103107

104108
```python
105109
# load breast cancer dataset, a well-known small dataset that comes with scikit-learn
@@ -172,14 +176,14 @@ While you can train on the various compute targets supported by Azure Machine Le
172176

173177
1. Create a training script in a local Jupyter notebook (for example, run_explainer.py).
174178

175-
```python
179+
```python
176180
run = Run.get_context()
177181
client = ExplanationClient.from_run(run)
178182

179183
# Train your model here
180184

181-
# explain predictions on your local machine
182-
# "features" and "classes" fields are optional
185+
# explain predictions on your local machine
186+
# "features" and "classes" fields are optional
183187
explainer = TabularExplainer(model, x_train, features=breast_cancer_data.feature_names, classes=classes)
184188
# explain overall model predictions (global explanation)
185189
global_explanation = explainer.explain_global(x_test)
@@ -197,7 +201,7 @@ While you can train on the various compute targets supported by Azure Machine Le
197201

198202
2. Follow the instructions on [Set up compute targets for model training](how-to-set-up-training-targets.md#amlcompute) to learn about how to set up an Azure Machine Learning Compute as your compute target and submit your training run.
199203

200-
3. Download the explanation in your local Jupyter notebook.
204+
3. Download the explanation in your local Jupyter notebook.
201205

202206
```python
203207
from azureml.contrib.explain.model.explanation.explanation_client import ExplanationClient
@@ -256,7 +260,7 @@ ExplanationDashboard(global_explanation, model, x_test)
256260

257261
## Raw feature transformations
258262

259-
Optionally, you can pass your feature transformation pipeline to the explainer to receive explanations in terms of the raw features before the transformation (rather than engineered features). If you skip this, the explainer provides explanations in terms of engineered features.
263+
Optionally, you can pass your feature transformation pipeline to the explainer to receive explanations in terms of the raw features before the transformation (rather than engineered features). If you skip this, the explainer provides explanations in terms of engineered features.
260264

261265
The format of supported transformations is same as the one described in [sklearn-pandas](https://github.com/scikit-learn-contrib/sklearn-pandas). In general, any transformations are supported as long as they operate on a single column and are therefore clearly one to many.
262266

@@ -299,7 +303,7 @@ The explainer can be deployed along with the original model and can be used at s
299303
```
300304

301305
1. Create a scoring explainer using the explanation object:
302-
306+
303307
```python
304308
scoring_explainer = explainer.create_scoring_explainer(x_test)
305309

@@ -308,7 +312,7 @@ The explainer can be deployed along with the original model and can be used at s
308312
```
309313

310314
1. Configure and register an image that uses the scoring explainer model.
311-
315+
312316
```python
313317
# Register explainer model using the path from ScoringExplainer.save - could be done on remote compute
314318
run.upload_file('breast_cancer_scoring_explainer.pkl', scoring_explainer_path)
@@ -376,22 +380,22 @@ The explainer can be deployed along with the original model and can be used at s
376380
```python
377381
from azureml.core.webservice import AciWebservice
378382

379-
aciconfig = AciWebservice.deploy_configuration(cpu_cores=1,
380-
memory_gb=1,
381-
tags={"data": "breastcancer",
382-
"method" : "local_explanation"},
383+
aciconfig = AciWebservice.deploy_configuration(cpu_cores=1,
384+
memory_gb=1,
385+
tags={"data": "breastcancer",
386+
"method" : "local_explanation"},
383387
description='Get local explanations for breast cancer data')
384388
```
385389

386390
1. Create a file with environment dependencies
387391

388392
```python
389-
from azureml.core.conda_dependencies import CondaDependencies
393+
from azureml.core.conda_dependencies import CondaDependencies
390394

391395
# WARNING: to install this, g++ needs to be available on the Docker image and is not by default (look at the next cell)
392396

393397

394-
myenv = CondaDependencies.create(pip_packages=["azureml-defaults", "azureml-explain-model", "azureml-contrib-explain-model"],
398+
myenv = CondaDependencies.create(pip_packages=["azureml-defaults", "azureml-explain-model", "azureml-contrib-explain-model"],
395399
conda_packages=["scikit-learn"])
396400

397401
with open("myenv.yml","w") as f:
@@ -405,7 +409,7 @@ The explainer can be deployed along with the original model and can be used at s
405409

406410
```python
407411
%%writefile dockerfile
408-
RUN apt-get update && apt-get install -y g++
412+
RUN apt-get update && apt-get install -y g++
409413
```
410414

411415
1. Deploy the created image (time estimate: 5 minutes)
@@ -416,8 +420,8 @@ The explainer can be deployed along with the original model and can be used at s
416420

417421
# Use the custom scoring, docker, and conda files we created above
418422
image_config = ContainerImage.image_configuration(execution_script="score.py",
419-
docker_file="dockerfile",
420-
runtime="python",
423+
docker_file="dockerfile",
424+
runtime="python",
421425
conda_file="myenv.yml")
422426

423427
# Use configs and models generated above
@@ -428,7 +432,7 @@ The explainer can be deployed along with the original model and can be used at s
428432
image_config=image_config)
429433

430434
service.wait_for_deployment(show_output=True)
431-
```
435+
```
432436

433437
1. Test the deployment
434438

@@ -452,6 +456,30 @@ The explainer can be deployed along with the original model and can be used at s
452456

453457
1. Clean up: To delete a deployed web service, use `service.delete()`.
454458

459+
## Interpretability in automated ML
460+
461+
Automated machine learning contains packages for interpreting feature importance in auto-trained models. Additionally, classification scenarios allow you to retrieve class-level feature importance. There are two methods to enable this behavior within automated machine learning:
462+
463+
* To enable feature importance for a trained ensemble model, use the [`explain_model()`](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.automlexplainer?view=azure-ml-py) function.
464+
465+
```python
466+
from azureml.train.automl.automlexplainer import explain_model
467+
468+
shap_values, expected_values, overall_summary, overall_imp, \
469+
per_class_summary, per_class_imp = explain_model(fitted_model, X_train, X_test)
470+
```
471+
472+
* To enable feature importance for each individual run prior to training, set the `model_explainability` parameter to `True` in the `AutoMLConfig` object, along with providing validation data. Then use the [`retrieve_model_explanation()`](https://docs.microsoft.com/en-us/python/api/azureml-train-automl/azureml.train.automl.automlexplainer?view=azure-ml-py) function.
473+
474+
```python
475+
from azureml.train.automl.automlexplainer import retrieve_model_explanation
476+
477+
shap_values, expected_values, overall_summary, overall_imp, per_class_summary, \
478+
per_class_imp = retrieve_model_explanation(best_run)
479+
```
480+
481+
For more information, see the [how-to](how-to-configure-auto-train.md#explain-the-model-interpretability) on enabling interpretability features in automated machine learning.
482+
455483
## Next steps
456484

457485
To see a collection of Jupyter notebooks that demonstrate the instructions above, see the [Azure Machine Learning Interpretability sample notebooks](https://github.com/Azure/MachineLearningNotebooks/tree/master/how-to-use-azureml/explain-model).

articles/site-recovery/azure-stack-site-recovery.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rayne-wiselman
66
manager: carmonm
77
ms.topic: conceptual
88
ms.service: site-recovery
9-
ms.date: 12/27/2018
9+
ms.date: 05/30/2019
1010
ms.author: raynew
1111
---
1212
# Replicate Azure Stack VMs to Azure

articles/site-recovery/azure-to-azure-architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rayne-wiselman
66
manager: carmonm
77
ms.service: site-recovery
88
ms.topic: conceptual
9-
ms.date: 03/18/2019
9+
ms.date: 05/30/2019
1010
ms.author: raynew
1111
---
1212

articles/site-recovery/azure-to-azure-quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rayne-wiselman
66
manager: carmonm
77
ms.service: site-recovery
88
ms.topic: quickstart
9-
ms.date: 03/12/2019
9+
ms.date: 05/30/2019
1010
ms.author: raynew
1111
ms.custom: mvc
1212
---

articles/site-recovery/azure-to-azure-replicate-after-migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: site-recovery
55
author: rayne-wiselman
66
ms.service: site-recovery
77
ms.topic: article
8-
ms.date: 04/16/2019
8+
ms.date: 05/30/2019
99
ms.author: raynew
1010
---
1111

articles/site-recovery/azure-to-azure-support-matrix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: rayne-wiselman
55
manager: carmonm
66
ms.service: site-recovery
77
ms.topic: article
8-
ms.date: 05/14/2019
8+
ms.date: 05/30/2019
99
ms.author: raynew
1010

1111
---

articles/site-recovery/azure-to-azure-tutorial-dr-drill.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rayne-wiselman
66
manager: carmonm
77
ms.service: site-recovery
88
ms.topic: tutorial
9-
ms.date: 04/08/2019
9+
ms.date: 05/30/2019
1010
ms.author: raynew
1111
ms.custom: mvc
1212
---

articles/site-recovery/azure-to-azure-tutorial-enable-replication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: rayne-wiselman
66
manager: carmonm
77
ms.service: site-recovery
88
ms.topic: tutorial
9-
ms.date: 04/16/2019
9+
ms.date: 05/30/2019
1010
ms.author: raynew
1111
ms.custom: mvc
1212
---

0 commit comments

Comments
 (0)