autoplot.linear_stack: Plot results of a stacked ensemble model.

View source: R/plots.R

autoplot.linear_stackR Documentation

Plot results of a stacked ensemble model.

Description

Plot results of a stacked ensemble model.

Usage

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

Arguments

object

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

type

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

n

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.

Details

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.

Value

A ggplot object.


stacks documentation built on Nov. 6, 2023, 5:08 p.m.