Skip to content

WIP support future extensiblity of grid search results #2079

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

jnothman
Copy link
Member

  • Work with result dicts rather than tuples from fitting each fold, being @ogrisel's proposal for the native storage of search results (with the intention to produce a fault-tolerant log of all fold results.)
  • Refactor grid_search and cross_validation.cross_val_score into a CVScorer, which I think should be private for this release until we're happy with its interface.

This will make it much easier to support returning training times, etc. and additional input such as sample_weight.

One of the main problem with dicts is that, unlike attributes of objects, the field names are difficult to deprecate (though if we needed to, we might consider subclassing dict).

It is part of the way towards a more extensible results interface from the *SearchCV estimators, as discussed at the ML, #1787, #1768, and to some extent #1034, #1020.

Note: the CVScorer introduced in this PR is missing tests as yet.

* Work with result dicts rather than tuples from fitting each fold
* Refactor grid_search and cross_validation.cross_val_score
@jnothman
Copy link
Member Author

jnothman commented May 3, 2014

I note that result extensibility is still missing, but the refactoring that featured in this PR has been made redundant by @AlexanderFabisch's contributions. I'm closing this PR as it can't be easily rebased, and making _fit_and_score return a dict can be easily done in a more complete PR.

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.

1 participant