We saw automatic cross-validation, the cross_val_score function, in Chapter 1, High-Performance Machine Learning – NumPy. This will be very similar, except we will use the last two columns of the iris dataset as the data. The purpose of this section is to select the best model we can.
Before starting, we will define the best model as the one that scores the highest. If there happens to be a tie, we will choose the model that has the best score with the least volatility.