The K-layer crossover test is to randomly divide the original data into k parts. In this K section, select one as the test data, and the remaining K-1 as the training data.
The cross-validation process is actually to repeat the experiment K times, each experiment selects a different part from K parts as the test data (ensure that K parts of the data have been tested respectively), the remaining K-1 as the training data for the experiment, finally, we averaged the results of K experiments.
in K -fold cross-validation, the original sample is randomly partitioned into K subsamples. of the K subsamples, a single subsample is retained as the validation data for testing the model, and the remaining K −1 subsamples are used as training data. the cross-validation process is then repeated K times (the folds ), with each of the K subsamples used exactly once as the validation data. the K results from the folds then can be averaged (or otherwise combined) to produce a single estimation. the advantage of this method over repeated random sub-sampling is that all observations are used for both training and validation, and each observation is used for validation exactly once. 10-fold cross-validation is commonly used.