Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • Can you elaborate? you wrote that when using KFold you get an error. is this in the code you attached? on what line Commented Aug 15, 2018 at 5:50
  • @ShaharA Thanks for the comment. it raises error when it want to do KFold. so early line in the code, the reason I put the whole code here is that to show what purpose later I want to use them. Actually the code working perfectly when I apply train_test_split, but with KFOLD it does not Commented Aug 15, 2018 at 5:53
  • Did you try kf.split(X) without the y inside? Commented Aug 15, 2018 at 6:08
  • @ShaharA Yes Actually, it seems it does not relate to that argument Commented Aug 15, 2018 at 6:09
  • I also updated with a small sample of my data frame so it is now reproducible. Commented Aug 15, 2018 at 6:18