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

Skip to content

Conversation

@nenorbot
Copy link

When evaluating different learning models, it's useful to pass your own KFold object so that they all train and test on the same sets. This change allows the user to pass his own object. If not passed, the behavior is as before.

@madrury
Copy link
Owner

madrury commented Dec 14, 2014

This is a good idea. I'll merge in this commit.

There is a minor issue though. The patch works fine if the user creates an un-weighted cv object by calling unweighted_k_fold of directly instantiating a sklearn.cross_validation.KFold object, but is hindered by the lack of .nfolds and .shuffle attributes if calling weighted_k_fold. Looks like the *_k_fold functions should return an object. I'll make it a priority to fix this.

madrury added a commit that referenced this pull request Dec 14, 2014
Allow passing an existing kfold object when creating a new CVGlmNet.
@madrury madrury merged commit 48e6a29 into madrury:master Dec 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants