scikit-learn/scikit-learn — pull request #2079 by jnothman (2013-06-20 13:12:38+00:00)
Title: WIP support future extensiblity of grid search results

* Work with result dicts rather than tuples from fitting each fold, being @ogrisel's [proposal](https://github.com/scikit-learn/scikit-learn/pull/1787#issuecomment-19685071) for the native storage of search results (with the intention to be fault tolerant, etc.)
* Refactor `grid_search` and `cross_validation.cross_val_score` into a `CVScorer`, which I think CVScorer 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](http://sourceforge.net/mailarchive/forum.php?thread_name=CAAkaFLVE%2B8u4sY-Ad4XZvkMfMPeT-PV%2B5RMXCFyrjRUj1aTekg%40mail.gmail.com&forum_name=scikit-learn-general) #1787, #1768, and to some extent #1034, #1020.

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