Skip to content

DOC: fix outdated information in doc string of GridSearchCV #5348

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 1 commit into from
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
15 changes: 10 additions & 5 deletions sklearn/grid_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,18 +603,22 @@ def _fit(self, X, y, parameter_iterable):
class GridSearchCV(BaseSearchCV):
"""Exhaustive search over specified parameter values for an estimator.

Important members are fit, predict.
GridSearchCV is a meta-estimator which wraps another supervised or
unsupervised estimator. Parameters of the wrapped estimator are
chosen from a pre-specified grid such that the cros-validation
score is maximized.

GridSearchCV implements a "fit" method and a "predict" method like
any classifier except that the parameters of the classifier
used to predict is optimized by cross-validation.
By default, the cross-validation score is computed using the ``score()``
method of the wrapped estimator; alternative scoring behavior can be
specified with the ``scoring`` parameter (see below).

Read more in the :ref:`User Guide <grid_search>`.

Parameters
----------
estimator : object type that implements the "fit" and "predict" methods
estimator : estimator object
A object of that type is instantiated for each grid point.
This is assumed to derive from sklearn.base.BaseEstimator.

param_grid : dict or list of dictionaries
Dictionary with parameters names (string) as keys and lists of
Expand All @@ -627,6 +631,7 @@ class GridSearchCV(BaseSearchCV):
A string (see model evaluation documentation) or
a scorer callable object / function with signature
``scorer(estimator, X, y)``.
This parameter is required if estimator does not have a "score" method.

fit_params : dict, optional
Parameters to pass to the fit method.
Expand Down