sklearn.grid_search.fit_grid_point

Warning

DEPRECATED

sklearn.grid_search.fit_grid_point(X, y, estimator, parameters, train, test, scorer, verbose, error_score='raise', **fit_params)[source]

Run fit on one set of parameters.

Deprecated since version 0.18: This module will be removed in 0.20. Use sklearn.model_selection.fit_grid_point instead.

Parameters:

X : array-like, sparse matrix or list

Input data.

y : array-like or None

Targets for input data.

estimator : estimator object

A object of that type is instantiated for each grid point. This is assumed to implement the scikit-learn estimator interface. Either estimator needs to provide a score function, or scoring must be passed.

parameters : dict

Parameters to be set on estimator for this grid point.

train : ndarray, dtype int or bool

Boolean mask or indices for training set.

test : ndarray, dtype int or bool

Boolean mask or indices for test set.

scorer : callable or None.

If provided must be a scorer callable object / function with signature scorer(estimator, X, y).

verbose : int

Verbosity level.

**fit_params : kwargs

Additional parameter passed to the fit function of the estimator.

error_score : ‘raise’ (default) or numeric

Value to assign to the score if an error occurs in estimator fitting. If set to ‘raise’, the error is raised. If a numeric value is given, FitFailedWarning is raised. This parameter does not affect the refit step, which will always raise the error.

Returns:

score : float

Score of this parameter setting on given training / test split.

parameters : dict

The parameters that have been evaluated.

n_samples_test : int

Number of test samples in this split.