I am new to machine learning and am trying to understand cross_val_score
uses Kfold to split the data to k folds.
kf = KFold(n_splits=2)
cv_results =cross_val_score(model, X_train, Y_train, cv=kf)
I know kfold
splits the data but I tried printing it out
dataset = [[1,1,1],[2,2,2],[3,3,3],[4,4,4],[5,5,5],[6,6,6],[7,7,7],[8,8,8]]
kf = KFold(n_splits=2)
print kf
>>> KFold(n_splits=2, random_state=None, shuffle=False)
It doesn't show the k folds but then how does cross_val_score
get all the folds?