Suggest the number of the variable with the largest difference in attribution between the primary and comparison observations.
Arguments
- attr_df
A data frame of local explanation attributions.
- primary_obs
The rownumber of the primary observation. Its local attribution becomes the 1d projection basis, and the point it highlighted as a dashed line.
- comparison_obs
The rownumber of the comparison observation. Point is highlighted as a dotted line.
See also
Other cheem utility:
as_logical_index()
,
color_scale_of()
,
contains_nonnumeric()
,
is_discrete()
,
is_diverging()
,
linear_tform()
,
logistic_tform()
,
problem_type()
,
rnorm_from()
,
sug_basis()
Examples
library(cheem)
## Regression setup
dat <- amesHousing2018_NorthAmes
X <- dat[, 1:9]
Y <- dat$SalePrice
clas <- dat$SubclassMS
## Suggest the number of a variable to manipulate
sug_manip_var(ames_rf_shap, primary_obs = 1, comparison_obs = 2)
#> [1] 4
## This can be used to find a basis to start the radial tour.
# ?radial_cheem_tour