op = par(pch = 19, mar = c(3, 3, 0.2, 0.7), mgp = c(1.5, 0.5, 0))
cv.nfeaturesLDA()
par(op)
# save the animation in HTML pages
oopt = ani.options(ani.height = 480, ani.width = 600, interval = 0.5, nmax = 10,
title = "Cross-validation to find the optimum number of features in LDA",
description = "This animation has provided an illustration of the process of
finding out the optimum number of variables using k-fold cross-validation
in a linear discriminant analysis (LDA).")
ani.start()
par(mar = c(3, 3, 1, 0.5), mgp = c(1.5, 0.5, 0), tcl = -0.3, pch = 19, cex = 1.5)
cv.nfeaturesLDA()
ani.stop()
ani.options(oopt)
Run the code above in your browser using DataLab