View source: R/sv_dependence.R
potential_interactions | R Documentation |
Returns vector of interaction strengths between variable v
and all other variables.
potential_interactions(obj, v)
obj |
An object of class "shapviz". |
v |
Variable name. |
If SHAP interaction values are available, interaction strength
between feature v
and another feature v'
is measured by twice their
mean absolute SHAP interaction values. Otherwise, we use as heuristic the
squared correlation between feature values of v'
and
SHAP values of v
, averaged over (binned) values of v
.
A numeric v
with more than n_bins
unique values is binned into quantile bins.
Currently n_bins
equals the smaller of n/20
and \sqrt n
, where n
is the sample size.
The average squared correlation is weighted by the number of non-missing feature
values in the bin. Note that non-numeric color features are turned to numeric
by calling data.matrix()
, which does not necessarily make sense.
A named vector of decreasing interaction strengths.
sv_dependence()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.