there are several benefits to using cross-validation instead of single split into training and test set firstremember that train_test_split performs random split of the data imagine that we are "luckywhen randomly splitting the dataand all examples that are hard to classify end up in the training set in that casethe test set will only contain "easyexamplesand our test set accuracy will be unrealistically high converselyif we are "unlucky,we might have randomly put all the hard-toclassify examples in the test set and consequently obtain an unrealistically low score howeverwhen using cross-validationeach example will be in the training set exactly onceeach example is in one of the foldsand each fold is the test set once thereforethe model needs to generalize well to all of the samples in the dataset for all of the cross-validation scores (and their meanto be high having multiple splits of the data also provides some information about how sensitive our model is to the selection of the training dataset for the iris datasetwe saw accuracies between and this is quite rangeand it provides us with an idea about how the model might perform in the worst case and best case scenarios when applied to new data another benefit of cross-validation as compared to using single split of the data is that we use our data more effectively when using train_test_splitwe usually use of the data for training and of the data for evaluation when using five-fold cross-validationin each iteration we can use four-fifths of the data ( %to fit the model when using -fold cross-validationwe can use nine-tenths of the data ( %to fit the model more data will usually result in more accurate models the main disadvantage of cross-validation is increased computational cost as we are now training models instead of single modelcross-validation will be roughly times slower than doing single split of the data it is important to keep in mind that cross-validation is not way to build model that can be applied to new data cross-validation does not return model when calling cross_val_scoremultiple models are built internallybut the purpose of cross-validation is only to evaluate how well given algorithm will generalize when trained on specific dataset stratified -fold cross-validation and other strategies splitting the dataset into folds by starting with the first one- -th part of the dataas described in the previous sectionmight not always be good idea for examplelet' have look at the iris dataset model evaluation and improvement