automl_explain_utilities module

Utilities that could be used from AutoML after training for explaining AutoML models.

Classes

AutoMLExplainerSetupClass

Placeholder class for all objects needed for interface with AzureML explain package.

StreamingPipelineExplainabilityWrapper

Wrapper for streaming pipelines that implements APIs expected by Azure model explainability library.

Functions

automl_setup_model_explanations(fitted_model: typing.Union[sklearn.pipeline.Pipeline, azureml.automl.core.streaming_pipeline_wrapper.StreamingPipelineWrapper], task: str, X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow, azureml.data.tabular_dataset.TabularDataset, NoneType] = None, X_test: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow, azureml.data.tabular_dataset.TabularDataset, NoneType] = None, y: typing.Union[numpy.ndarray, pandas.core.series.Series, azureml.dataprep.api.dataflow.Dataflow, azureml.data.tabular_dataset.TabularDataset, NoneType] = None, features: typing.Union[typing.List[str], NoneType] = None, **kwargs: typing.Any) -> azureml.train.automl.automl_explain_utilities.AutoMLExplainerSetupClass

Set up the featurized data for explaining an AutoML model.

automl_setup_model_explanations(fitted_model: typing.Union[sklearn.pipeline.Pipeline, azureml.automl.core.streaming_pipeline_wrapper.StreamingPipelineWrapper], task: str, X: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow, azureml.data.tabular_dataset.TabularDataset, NoneType] = None, X_test: typing.Union[numpy.ndarray, pandas.core.frame.DataFrame, scipy.sparse.base.spmatrix, azureml.dataprep.api.dataflow.Dataflow, azureml.data.tabular_dataset.TabularDataset, NoneType] = None, y: typing.Union[numpy.ndarray, pandas.core.series.Series, azureml.dataprep.api.dataflow.Dataflow, azureml.data.tabular_dataset.TabularDataset, NoneType] = None, features: typing.Union[typing.List[str], NoneType] = None, **kwargs: typing.Any) -> azureml.train.automl.automl_explain_utilities.AutoMLExplainerSetupClass

Parameters

fitted_model
Union[Pipeline or StreamingPipelineWrapper]

The fitted AutoML model.

task
str or Tasks

'classification', 'regression', or 'forecasting' depending on what kind of ML problem.

X
DataFrame or ndarray or Dataflow or Dataset or DatasetDefinition or TabularDataset

The training features used when fitting pipelines during AutoML experiment.

y
DataFrame or ndarray or Dataflow or Dataset or DatasetDefinition or TabularDataset

Training labels to use when fitting pipelines during AutoML experiment.

X_test
DataFrame or ndarray or Dataflow or Dataset or DatasetDefinition or TabularDataset

Test data using which the model will be explained.

features
list[str]

A list of raw feature names.

kwargs
dict

Returns

The model's explanation setup class