Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/modules/cross_validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,18 @@ Example of 3-split time series cross-validation on a dataset with 6 samples::
[0 1 2 3 4] [5]


Obtaining estimators for each split
===================================

While there is no built-in way to obtain the estimators fitted on each split, the following concise piece of code shows how to achieve this while retaining parallel training::

def fit_estimator(est, X, y):
return est.fit(X, y)

clf_cv = Parallel(n_jobs=-1)(delayed(fit_estimator)(
MyEstimator(), X[train], y[train]) for train, _ in SomeCrossValidation().split(X, y))


A note on shuffling
===================

Expand Down