train
object and creates
a line or level plot using the ## S3 method for class 'train':
plot(x,
plotType = "scatter",
metric = x$metric[1],
digits = getOption("digits") - 3,
xTrans = NULL,
nameInStrip = FALSE,
...)## S3 method for class 'train':
ggplot(data = NULL,
metric = data$metric[1],
plotType = "scatter",
output = "layered",
nameInStrip = FALSE,
highlight = FALSE,
...)
train
."scatter"
, "level"
or "line"
(plot
only))train
.ggplot
object with no layers. The third value returns a plot with a set of layers.TRUE
, a diamond is placed around the optimal parameter setting for models using grid search.If there are two tuning parameters with different values, a plot can be produced where a different line is shown for each value of of the other parameter. For three parameters, the same line plot is created within conditioning panels/facets of the other parameter.
Also, with two tuning parameters (with different values), a levelplot (i.e. un-clustered heatmap) can be created. For more than two parameters, this plot is created inside conditioning panels/facets.
train
, levelplot
, xyplot
, stripplot
, ggplot
library(klaR)
rdaFit <- train(Species ~ .,
data = iris,
method = "rda",
control = trainControl(method = "cv"))
plot(rdaFit)
plot(rdaFit, plotType = "level")
ggplot(rdaFit) + theme_bw()
Run the code above in your browser using DataCamp Workspace