anothervery flexible strategy for cross-validation is shuffle-split cross-validation in shuffle-split cross-validationeach split samples train_size many points for the training set and test_size many (disjointpoint for the test set this splitting is repeated n_iter times figure - illustrates running four iterations of splitting dataset consisting of pointswith training set of points and test sets of points each (you can use integers for train_size and test_size to use absolute sizes for these setsor floating-point numbers to use fractions of the whole dataset)in[ ]mglearn plots plot_shuffle_split(figure - shufflesplit with pointstrain_size= test_size= and n_iter= the following code splits the dataset into training set and test set for iterationsin[ ]from sklearn model_selection import shufflesplit shuffle_split shufflesplit(test_size train_size n_splits= scores cross_val_score(logregiris datairis targetcv=shuffle_splitprint("cross-validation scores:\ {}format(scores)out[ ]cross-validation scores shuffle-split cross-validation allows for control over the number of iterations independently of the training and test sizeswhich can sometimes be helpful it also allows for using only part of the data in each iterationby providing train_size and test_size settings that don' add up to one subsampling the data in this way can be useful for experimenting with large datasets there is also stratified variant of shufflesplitaptly named stratifiedshuffles plitwhich can provide more reliable results for classification tasks model evaluation and improvement