stumpsVariableImportance: Calculates variable importance measure from a...

View source: R/util_functions.R

stumpsVariableImportanceR Documentation

Calculates variable importance measure from a 'veb_boost_stumps' fit

Description

This function can calculate a few variable importance measures from a 'veb_boost_stumps' fit. It combines the posterior probabilities from each base learner (optionally weighted by the KL-divergence of that base learner) in order to give a single numerical value for variable importance for each variable (combinind linear and stumps terms together)

Usage

stumpsVariableImportance(
  veb_fit,
  method = c("pip", "sum"),
  scale_by_KL_div = TRUE
)

Arguments

veb_fit

is the fitted object from veb_boost_stumps

method

is either "pip" or "sum", depending on how the posterior probabilities from the base learners are to be combined N.B. "pip" isn't very informative if 'veb_fit' has many leaves and 'scale_by_KL_div' is set to FALSE

scale_by_KL_div

is a logical for if the KL-divergence of the base learner should be taken into account. Intuitively, if a learner has a learner KL-divergence, it is fitting more signal, and should count for more

Details

This function takes in a return object from veb_boost_stumps and returns a measure of variable importance. It either returns an estimated PIP for if a variable is included in some form (linear or stump term) somewhere in the fit, or the sum of probabilities across all base learners for that variable (combining linear and stump terms)

Value

a vector of positive values, either PIPs or sum of probabilities. The order is in the same order as the columns of the original X matrix that was supplied to veb_boost_stumps


stephenslab/VEB.Boost documentation built on July 2, 2023, 1 p.m.