Skip to content

Plot results of a stacked ensemble model.


# S3 method for linear_stack
autoplot(object, type = "performance", n = Inf, ...)



A linear_stack object outputted from blend_predictions() or fit_members().


A single character string for plot type with values "performance", "members", or "weights".


An integer for how many members weights to plot when type = "weights". With multi-class data, this is the total number of weights across classes; otherwise this is equal to the number of members.


Not currently used.


A ggplot object.


A "performance" plot shows the relationship between the lasso penalty and the resampled performance metrics. The latter includes the average number of ensemble members. This plot can be helpful for understanding what penalty values are reasonable.

A "members" plot shows the relationship between the average number of ensemble members and the performance metrics. Each point is for a different penalty value.

Neither of the "performance" or "members" plots are helpful when a single penalty is used.

A "weights" plot shows the blending weights for the top ensemble members. The results are for the final penalty value used to fit the ensemble.