0

k fold cross validation

In k fold cross validation we use the split function on X and get X_train, X_test values from there but where are the values of y_train, and y_test coming from ?

27th Jun 2022, 6:00 PM
Harshit Sharma
Harshit Sharma - avatar
1 Answer
0
Split function return indices of the datapoints that are to be included in training and testing. Since x and y are of equal size it doesn't matter which you give as argument to split function because it is only the index in the form of array that is returned by split function.
28th Jun 2022, 3:40 AM
Sanjyot21
Sanjyot21 - avatar