I am using K-Fold cross validation from sklearn.model_selection for evaluating the performance of my model. K=10 and the K-fold cross-validation is set as:

kfcv=Kfold(n_splits=10, random_state=0, shuffle=True)

The result of the first fold is 70% while remaining 9 folds are 100%. I have set random state to another value (such as 50), the same problem.

Why is the high discrepancy only with the first fold? I have used 5 fold and the same problem with the first fold. I expect that other folds should also reflects a decrease since the division is random and I also set shuffle to be true.

Is there anything am doing wrongly? If not, what would be the likely explanation for this?


  • $\begingroup$ How many "examples" are there that the K-Fold operates upon? $\endgroup$ – A_A Mar 14 '19 at 13:17
  • $\begingroup$ Thanks for your response. Fine-tuned on a small dataset with 2420 examples. $\endgroup$ – I.O Animasahun Mar 15 '19 at 3:49
  • $\begingroup$ And this discrepancy is consistent across more than one runs? $\endgroup$ – A_A Mar 15 '19 at 7:30
  • $\begingroup$ not consistent. Only with the first fold (70%) while others gave me 100%. Why the discrepancy is only with the first fold and other folds gave good results? Is this strange and if not, what could be the likely explanation for this? $\endgroup$ – I.O Animasahun Mar 15 '19 at 9:39
  • $\begingroup$ If you run K-fold once, it would run the computation partitioning the data in one way. If you run it again, the data will be partitioned in a different way. Is this behaviour that you report consistent between runs? $\endgroup$ – A_A Mar 15 '19 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.