Print number of predictors and area-of-applicability threshold
Source:R/area_of_applicability.R
print.ww_area_of_applicability.Rd
Print number of predictors and area-of-applicability threshold
Examples
library(vip)
trn <- gen_friedman(500, seed = 101) # ?vip::gen_friedman
pp <- ppr(y ~ ., data = trn, nterms = 11)
metric_name <- ifelse(
packageVersion("vip") > package_version("0.3.2"),
"rsq",
"rsquared"
)
importance <- vip::vi_permute(
pp,
target = "y",
metric = metric_name,
pred_wrapper = predict,
train = trn
)
ww_area_of_applicability(trn[2:11], importance = importance)
#> # Predictors:
#> 10
#> Area-of-applicability threshold:
#> 0.3457622