From 35793b1b220870340c88db84e34727f24f08b9a2 Mon Sep 17 00:00:00 2001 From: Eric Czech Date: Thu, 9 Nov 2023 14:52:18 -0500 Subject: [PATCH] Update function docs --- xrml/utils.py | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/xrml/utils.py b/xrml/utils.py index 8ab3366..f729f1d 100644 --- a/xrml/utils.py +++ b/xrml/utils.py @@ -453,24 +453,6 @@ def _explain( tree_shap_check_additivity: bool, **kwargs: Any, ) -> Dataset: - """ - Add per-sample, per-feature, model-specific weights to dataset (e.g. SHAP values) - - :param model: model to explain. Can be a sklearn pipeline. Final step can be a CV, - in which case explain will use the best estimator. - :param shap_mode: see: https://github.com/related-sciences/facets/issues/938. - Intuition: `true-to-data`, feature contribution are shared across correlated - features (even if some features are not used by the particular model), useful - when you care more about insights within the data than a particular model. - `true-to-model` tries to break correlation, gives contribution to the - features actually used by the model, useful when you care about this - particular model. - :param tree_shap_check_additivity: control validation check that the sum of the SHAP values - equals the output of the model. - See: https://github.com/slundberg/shap/issues/1098#issuecomment-599622440 and - other issues related to check_additivity. - """ - def get_shap_values(ds: Dataset) -> Dataset: # NOTE: labels can be NaN here, and will be included X, Y = _split(ds, squeeze_y=True)