DashAI.back.explainability.PartialDependence
- class PartialDependence(model: BaseModel, lower_percentile: float = 0.05, upper_percentile: float = 0.95, grid_resolution: int = 100)[source]
Partial Dependence is a model-agnostic explainability method that shows the average prediction of a machine learning model for each possible value of a feature.
- __init__(model: BaseModel, lower_percentile: float = 0.05, upper_percentile: float = 0.95, grid_resolution: int = 100)[source]
Initialize a new instance of a PartialDependence explainer.
- Parameters:
model (BaseModel) – Model to be explained.
lower_percentile (int) – The lower and upper percentile used to limit the feature values. Defaults to 0.05
upper_percentile (int) – The lower and upper percentile used to limit the feature values. Default to 0.95
grid_resolution (int) – The number of equidistant points to split the range of the target feature. Defaults to 100.
Methods
__init__(model[, lower_percentile, ...])Initialize a new instance of a PartialDependence explainer.
explain(dataset)Method to generate the explanation
get_schema()Generates the component related Json Schema.
plot(explanation)Method to create the explanation plot.
validate_and_transform(raw_data)It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Attributes
COLORCOMPATIBLE_COMPONENTSDISPLAY_NAMETYPE