Variable importance by permutations on predictors
Source:R/keras_helpers.R
, R/randomForest_helpers.R
, R/xgboost_helpers.R
variableImportance.Rd
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 defaultFALSE
.- ...
Details
See ingredients::feature_importance()
. This function also works for multiinput and 3d data.