K-fold cross-validation demo for kernel classifiers
Build a 2D binary classification dataset, choose a kernelized classifier and its hyperparameters,
and then inspect each fold’s training/validation split. In every fold view,
training points are circles and validation points are squares.
1. Create a 2D binary classification dataset
Red class (label -1) Blue class (label +1)
Click anywhere in the square to add points. You can erase the nearest point in erase mode.
Coordinates run from -1 to 1 on both axes.
2. Choose the cross-validation and model settings
Background shading in each fold panel shows the learned classifier on that training split, and the black curve shows the classification boundary.
Classification error is measured by the sign of the learned score.
3. The k validation split panels
Red training point Blue training point Red validation point Blue validation point