cellmil.interfaces.SHAPExplainerConfig¶
Classes
|
Configuration for SHAP explainability method. |
|
SHAP explainer types. |
- class cellmil.interfaces.SHAPExplainerConfig.SHAPExplainerType(value)[source]¶
-
SHAP explainer types.
- gradient = 'gradient'¶
- deep = 'deep'¶
- kernel = 'kernel'¶
- _generate_next_value_(start, count, last_values)¶
Generate the next value when not given.
name: the name of the member start: the initial start value or None count: the number of existing members last_value: the last value assigned or None
- class cellmil.interfaces.SHAPExplainerConfig.SHAPExplainerConfig(*, output_path: Path, num_bins: int = 5, samples_per_bin: int = 10000, max_total_samples: Optional[int] = None, explainer_type: SHAPExplainerType = SHAPExplainerType.gradient, background_percentage: float = 0.2, nsamples: int = 500, explain_top_cells: Optional[int] = None, explain_per_head: bool = True, explain_mean_head: bool = True, top_features: int = 20, random_seed: int = 42, batch_size: int = 1024, save_raw_shap_values: bool = True, create_summary_plots: bool = True)[source]¶
Bases:
BaseModelConfiguration for SHAP explainability method.
- explainer_type: SHAPExplainerType¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].