Shuffle split cross validation

Опубликовано: 06 Июнь 2026
на канале: AKAdemy
1,051
10

Another, very flexible strategy for cross validation is shuffle-split cross-validation.

In shuffle-split cross-validation, each split samples train_size many points for the training set, and test_size many (disjoint) point for the test set.

This splitting is repeated n_iter many times.

Figure shuffle_split illustrates running four iterations of splitting a dataset consisting of 10 points, with a training set of 5 points and a test set of 2 points each.

You can use integers for train_size and test_size to use absolute sizes of these sets, or floating points numbers, to use fractions of the whole dataset.