Introduction.
library(animation)
saveHTML({options(nmax = 10,interval = 2)
par(mar = c(3, 3, 1, 0.5), mgp = c(1.5, 0.5, 0), tcl = -0.3)
cv.ani(bty = "l")
},
img.name="cv_ani",htmlfile="cv_ani.html",
ani.height = 500, ani.width = 600, outdir = getwd(),
title = "Demonstration of the k-fold Cross Validation",
description = c("This is a naive demonstration for the k-fold cross
validation. The k rectangles in the plot denote the k folds of data.
Each time a fold will be used as the test set and the rest parts
as the training set."))