cv.ani: Demonstration for the process of cross-validation
Description
Simply speaking, the process of cross-validation is just to split the whole data set into several parts and select one part as the test set and the rest parts as the training set. This function uses rectangles to illustrate these `parts' and mark the test set & the training set with different colors.
Usage
cv.ani(x = runif(150), k = 10, control = ani.control(interval = 2,
nmax = 50), ...)
Arguments
x
a numerical vector which stands for the sample points.
k
an integer: how many parts should we split the data into? (comes from the k-fold cross-validation.)
control
control parameters for the animation; see ani.control