Skip to content

CRAN release 0.5.0

Compare
Choose a tag to compare
@mayer79 mayer79 released this 03 Feb 11:30
· 272 commits to main since this release
bd7b25f

shapviz 0.5.0

Major improvement: SHAP interaction values

  • Introduced API for SHAP interaction values S_inter (3D array):
    • Matrix method: shapviz(object, ..., S_inter = NULL)
    • XGBoost method: shapviz(object, ..., interactions = TRUE)
    • treeshap method: shapviz(object, ...)
  • sv_interaction(x) shows matrix of beeswarm plots.
  • sv_dependence(x, v = "x1", color_var = "x2", interactions = TRUE) plots SHAP interaction values.
  • sv_dependence(x, v = "x1", interactions = TRUE) plots pure main effects of "x1".
  • If SHAP interaction values are available, sv_dependence(..., color_var = "auto") uses those to determine the most interacting color variable.
  • collapse_shap() also works for SHAP interaction arrays.
  • SHAP interaction values can be extracted by get_shap_interactions().

User visible changes

  • sv_importance(): In case of too many features, sv_importance() used to collapse the remaining features into an additional bar/beeswarm. This logic has been removed, and the show_other argument has been deprecated.
  • By default, sv_dependence() automatically adds horizontal jitter for discrete v. This now also works if v is numeric with at most seven unique values, not only for logicals, factors, and character v.

Compatibility with "ggplot2"

  • "ggplot2" 3.4 has replaced the "size" aesthetic in line-based geoms by "linewidth". This has been adapted. "shapviz" now depends on ggplot2 >= 3.4.

Technical changes

  • sv_importance() does not use a flipped coordinate system anymore.