Compute the relative contributions of each of the base models in the ensemble model
Source:R/caret_stack.R
compute_model_contributions.caret_stack.RdThe 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'
compute_model_contributions(object, descending = TRUE, ...)Examples
# Load pre-trained example caret_stack object
data(heart_failure_stack)
compute_model_contributions(heart_failure_stack)
#> Model Relative Contribution
#> <char> <num>
#> 1: holter 44.1023
#> 2: mrna 35.3940
#> 3: proteins 20.5037
#> 4: cells 0.0000