Scikit-learn (Pedregosa et al., 2011) makes model selection reproducible with cross-validation utilities. K-fold splits the data into k parts; each part serves once as the test set while the others train the model.
Implement kfold_indices(n, k), returning the train and test indices for each of the k folds.
np.array_split.Split arange(n) into k parts, then for each part use it as the test set and the rest as train.
No results yet
Run your code to check it against the examples, or submit to run every test.