From de53d27c79fe0e1f6d72233688f92b3958e011c7 Mon Sep 17 00:00:00 2001 From: Andreas Mueller Date: Wed, 19 Oct 2011 22:58:37 +0200 Subject: [PATCH] DOC Added documentation for important attributes of GridSearchCV --- sklearn/grid_search.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sklearn/grid_search.py b/sklearn/grid_search.py index ca4b1c9794958..5f91a33b7b312 100644 --- a/sklearn/grid_search.py +++ b/sklearn/grid_search.py @@ -206,12 +206,26 @@ class GridSearchCV(BaseEstimator): param_grid=..., ...) + Attributes + ---------- + `grid_scores_` : dict + Contains scores for all parameter combinations in param_grid. + + `best_estimator` : estimator + Estimator that was choosen by grid search, i.e. estimator + which gave highest score (or smallest loss if specified) + on the left out data. + + `best_score` : score of best_estimator on the left out data. + + Notes ------ The parameters selected are those that maximize the score of the left out data, unless an explicit score_func is passed in which case it is used instead. If a loss function loss_func is passed, it overrides the score functions and is minimized. + """ def __init__(self, estimator, param_grid, loss_func=None, score_func=None,