Skip to contents

Extracts variable importance from a `caretStack` model and returns a `data.table` with columns `method` and `weight` sorted by importance.

Usage

prepare_importance(stack_model, newdata)

Arguments

stack_model

A trained `caretStack` model.

newdata

A data frame used for calculating variable importance.

Value

`data.table` with columns `method` (variable names) and `weight` (importance).