Here we are creating data to for a given model.
The main advantage with this code snippet is you are able to see how the model performers over various sizes of the training set. The learing_curve_data function can be found in the
[6.0-7.1 version of caret]. Of course, learning curves are useful in machine learning for several reason which include comparison of algorithms, choosing model parameters, optimization, right data size to use for training.
class_dat <- twoClassSim(1000)
lda_data <- learing_curve_dat(dat = class_dat,
outcome = "Class",
test_prop = 1/4,
## `train` arguments:
method = "lda",
metric = "ROC",
trControl = trainControl(classProbs = TRUE,
summaryFunction = twoClassSummary))
ggplot(lda_data, aes(x = Training_Size, y = ROC, color = Data)) +
geom_smooth(method = loess, span = .8) +