facet.explanation.parallel.ExplainerJob#
- class facet.explanation.parallel.ExplainerJob(explainer, X, y=None, *, interactions, **kwargs)[source]#
A call to an explanation function with given X and y values.
- Bases
Job
[Union
[ndarray
[Any
,dtype
[Any
]],List
[ndarray
[Any
,dtype
[Any
]]]]]- Metaclasses
- Parameters
explainer (
BaseExplainer
) – the SHAP explainer to useX (
Union
[ndarray
[Any
,dtype
[Any
]],DataFrame
,Pool
]) – the feature values of the observations to be explainedy (
Union
[ndarray
[Any
,dtype
[Any
]],Series
,None
]) – the target values of the observations to be explainedinteractions (
bool
) – ifFalse
, calculate SHAP values; ifTrue
, calculate SHAP interaction valueskwargs (
Any
) – additional arguments specific to the explanation method
Method summary
Run this job.
Attribute summary
the SHAP explainer to use
if
False
, calculate SHAp values; otherwise, calculate SHAP interaction valuesthe feature values of the observations to be explained
the target values of the observations to be explained
additional arguments specific to the explanation method
Definitions
- classmethod delayed(function)#
- X: Union[numpy.ndarray[Any, numpy.dtype[Any]], pandas.DataFrame, facet.explanation.Pool]#
the feature values of the observations to be explained
- explainer: facet.explanation.base.BaseExplainer#
the SHAP explainer to use
- y: Optional[Union[numpy.ndarray[Any, numpy.dtype[Any]], pandas.Series]]#
the target values of the observations to be explained