variableImportance: Variable importance by permutations on predictors

View source: R/xgboost_helpers.R View source: R/randomForest_helpers.R View source: R/keras_helpers.R

variableImportanceR Documentation

Variable importance by permutations on predictors

Description

Variable importance by permutations on predictors

Variable importance by permutations on predictors

Variable importance by permutations on predictors

Usage

variableImportance(
  model,
  data,
  y,
  repVi = 5,
  variable_groups = NULL,
  perm_dim = NULL,
  comb_dims = FALSE,
  ...
)

variableImportance(
  model,
  data,
  y,
  repVi = 5,
  variable_groups = NULL,
  perm_dim = NULL,
  comb_dims = FALSE,
  ...
)

variableImportance(
  model,
  data,
  y,
  repVi = 5,
  variable_groups = NULL,
  perm_dim = NULL,
  comb_dims = FALSE,
  ...
)

Arguments

model

the model to use for predictions.

data

input data to permute and to use for predictions.

y

response data corresponding to data features.

repVi

replicates of the permutations to calculate the importance of the variables. 0 to avoid calculating variable importance.

variable_groups

list of variables to join when calculating variable importance by permuting them at the same time.

perm_dim

dimension to perform the permutations to calculate the importance of the variables (data dimensions [case, time, variable]). If perm_dim = 2:3, it calculates the importance for each combination of the 2nd and 3rd dimensions.

comb_dims

variable importance calculations, if TRUE, do the permutations for each combination of the levels of the variables from 2nd and 3rd dimensions for input data with 3 dimensions. By default FALSE.

...

Details

See ingredients::feature_importance(). This function also works for multiinput and 3d data.


jmaspons/MLTools documentation built on Jan. 27, 2024, 4:31 a.m.