Using ROC AUC score with Logistic Regression and Iris Dataset

The iris dataset is usually ordered with respect to classes. Hence, when you split without shuffling, the test dataset might get only one class.

One simple solution would be using shuffle parameter.

kfold = model_selection.KFold(n_splits=10, shuffle=True, random_state=seed)

Even then roc_auc does not support multi-class format directly (iris - dataset has three classes).

Go through this link to know more information about how to use roc_auc for multi-class situation.