Skip to content

Commit

Permalink
Update function docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-czech committed Nov 9, 2023
1 parent 566eed5 commit 35793b1
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions xrml/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 35793b1

Please sign in to comment.