Skip to contents

The relative contributions are calculated using the caret::varImp function on the ensemble model. A scaling factor is applied to make the contributions sum to 100%.

Usage

# S3 method for class 'caret_stack'
plot_model_contributions(object, descending = TRUE, ...)

Arguments

object

A caret_stack object

descending

Whether to sort in descending order. If FALSE, the output is sorted in ascending order. Default is TRUE.

...

Not used. Included for S3 compatibility.

Value

A ggplot2 bar chart

Examples

# Load pre-trained example caret_stack object
data(heart_failure_stack)

plot_model_contributions(heart_failure_stack)