doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
class sklearn.model_selection.GridSearchCV(estimator, param_grid, *, scoring=None, n_jobs=None, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', error_score=nan, return_train_score=False) [source]
Exhaustive search over specified parameter values for an estimator. Important members are fit, predict. GridSearc... | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV |
sklearn.model_selection.GridSearchCV
class sklearn.model_selection.GridSearchCV(estimator, param_grid, *, scoring=None, n_jobs=None, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', error_score=nan, return_train_score=False) [source]
Exhaustive search over specified parameter values for an estimator. Import... | sklearn.modules.generated.sklearn.model_selection.gridsearchcv |
decision_function(X) [source]
Call decision_function on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports decision_function. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.decision_function |
fit(X, y=None, *, groups=None, **fit_params) [source]
Run fit with all sets of parameters. Parameters
Xarray-like of shape (n_samples, n_features)
Training vector, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples, n_output) or (n_samples,), def... | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.get_params |
inverse_transform(Xt) [source]
Call inverse_transform on the estimator with the best found params. Only available if the underlying estimator implements inverse_transform and refit=True. Parameters
Xtindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.inverse_transform |
predict(X) [source]
Call predict on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.predict |
predict_log_proba(X) [source]
Call predict_log_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_log_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.predict_log_proba |
predict_proba(X) [source]
Call predict_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.predict_proba |
score(X, y=None) [source]
Returns the score on the given data, if the estimator has been refit. This uses the score defined by scoring where provided, and the best_estimator_.score method otherwise. Parameters
Xarray-like of shape (n_samples, n_features)
Input data, where n_samples is the number of samples and ... | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.score |
score_samples(X) [source]
Call score_samples on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports score_samples. New in version 0.24. Parameters
Xiterable
Data to predict on. Must fulfill input requirements of the underlying estimator. Returns ... | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.score_samples |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.set_params |
transform(X) [source]
Call transform on the estimator with the best found parameters. Only available if the underlying estimator supports transform and refit=True. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.gridsearchcv#sklearn.model_selection.GridSearchCV.transform |
class sklearn.model_selection.GroupKFold(n_splits=5) [source]
K-fold iterator variant with non-overlapping groups. The same group will not appear in two different folds (the number of distinct groups has to be at least equal to the number of folds). The folds are approximately balanced in the sense that the number of... | sklearn.modules.generated.sklearn.model_selection.groupkfold#sklearn.model_selection.GroupKFold |
sklearn.model_selection.GroupKFold
class sklearn.model_selection.GroupKFold(n_splits=5) [source]
K-fold iterator variant with non-overlapping groups. The same group will not appear in two different folds (the number of distinct groups has to be at least equal to the number of folds). The folds are approximately bal... | sklearn.modules.generated.sklearn.model_selection.groupkfold |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsobject
Always ignored, exists for compatibility. Returns
n_split... | sklearn.modules.generated.sklearn.model_selection.groupkfold#sklearn.model_selection.GroupKFold.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,), default=None
The targ... | sklearn.modules.generated.sklearn.model_selection.groupkfold#sklearn.model_selection.GroupKFold.split |
class sklearn.model_selection.GroupShuffleSplit(n_splits=5, *, test_size=None, train_size=None, random_state=None) [source]
Shuffle-Group(s)-Out cross-validation iterator Provides randomized train/test indices to split data according to a third-party provided group. This group information can be used to encode arbitr... | sklearn.modules.generated.sklearn.model_selection.groupshufflesplit#sklearn.model_selection.GroupShuffleSplit |
sklearn.model_selection.GroupShuffleSplit
class sklearn.model_selection.GroupShuffleSplit(n_splits=5, *, test_size=None, train_size=None, random_state=None) [source]
Shuffle-Group(s)-Out cross-validation iterator Provides randomized train/test indices to split data according to a third-party provided group. This gr... | sklearn.modules.generated.sklearn.model_selection.groupshufflesplit |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsobject
Always ignored, exists for compatibility. Returns
n_split... | sklearn.modules.generated.sklearn.model_selection.groupshufflesplit#sklearn.model_selection.GroupShuffleSplit.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,), default=None
The targ... | sklearn.modules.generated.sklearn.model_selection.groupshufflesplit#sklearn.model_selection.GroupShuffleSplit.split |
class sklearn.model_selection.HalvingGridSearchCV(estimator, param_grid, *, factor=3, resource='n_samples', max_resources='auto', min_resources='exhaust', aggressive_elimination=False, cv=5, scoring=None, refit=True, error_score=nan, return_train_score=True, random_state=None, n_jobs=None, verbose=0) [source]
Search ... | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV |
sklearn.model_selection.HalvingGridSearchCV
class sklearn.model_selection.HalvingGridSearchCV(estimator, param_grid, *, factor=3, resource='n_samples', max_resources='auto', min_resources='exhaust', aggressive_elimination=False, cv=5, scoring=None, refit=True, error_score=nan, return_train_score=True, random_state=No... | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv |
decision_function(X) [source]
Call decision_function on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports decision_function. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.decision_function |
fit(X, y=None, groups=None, **fit_params) [source]
Run fit with all sets of parameters. Parameters
Xarray-like, shape (n_samples, n_features)
Training vector, where n_samples is the number of samples and n_features is the number of features.
yarray-like, shape (n_samples,) or (n_samples, n_output), optional
... | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.get_params |
inverse_transform(Xt) [source]
Call inverse_transform on the estimator with the best found params. Only available if the underlying estimator implements inverse_transform and refit=True. Parameters
Xtindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.inverse_transform |
predict(X) [source]
Call predict on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.predict |
predict_log_proba(X) [source]
Call predict_log_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_log_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.predict_log_proba |
predict_proba(X) [source]
Call predict_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.predict_proba |
score(X, y=None) [source]
Returns the score on the given data, if the estimator has been refit. This uses the score defined by scoring where provided, and the best_estimator_.score method otherwise. Parameters
Xarray-like of shape (n_samples, n_features)
Input data, where n_samples is the number of samples and ... | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.score |
score_samples(X) [source]
Call score_samples on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports score_samples. New in version 0.24. Parameters
Xiterable
Data to predict on. Must fulfill input requirements of the underlying estimator. Returns ... | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.score_samples |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.set_params |
transform(X) [source]
Call transform on the estimator with the best found parameters. Only available if the underlying estimator supports transform and refit=True. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvinggridsearchcv#sklearn.model_selection.HalvingGridSearchCV.transform |
class sklearn.model_selection.HalvingRandomSearchCV(estimator, param_distributions, *, n_candidates='exhaust', factor=3, resource='n_samples', max_resources='auto', min_resources='smallest', aggressive_elimination=False, cv=5, scoring=None, refit=True, error_score=nan, return_train_score=True, random_state=None, n_jobs... | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV |
sklearn.model_selection.HalvingRandomSearchCV
class sklearn.model_selection.HalvingRandomSearchCV(estimator, param_distributions, *, n_candidates='exhaust', factor=3, resource='n_samples', max_resources='auto', min_resources='smallest', aggressive_elimination=False, cv=5, scoring=None, refit=True, error_score=nan, re... | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv |
decision_function(X) [source]
Call decision_function on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports decision_function. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.decision_function |
fit(X, y=None, groups=None, **fit_params) [source]
Run fit with all sets of parameters. Parameters
Xarray-like, shape (n_samples, n_features)
Training vector, where n_samples is the number of samples and n_features is the number of features.
yarray-like, shape (n_samples,) or (n_samples, n_output), optional
... | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.get_params |
inverse_transform(Xt) [source]
Call inverse_transform on the estimator with the best found params. Only available if the underlying estimator implements inverse_transform and refit=True. Parameters
Xtindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.inverse_transform |
predict(X) [source]
Call predict on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.predict |
predict_log_proba(X) [source]
Call predict_log_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_log_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.predict_log_proba |
predict_proba(X) [source]
Call predict_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.predict_proba |
score(X, y=None) [source]
Returns the score on the given data, if the estimator has been refit. This uses the score defined by scoring where provided, and the best_estimator_.score method otherwise. Parameters
Xarray-like of shape (n_samples, n_features)
Input data, where n_samples is the number of samples and ... | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.score |
score_samples(X) [source]
Call score_samples on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports score_samples. New in version 0.24. Parameters
Xiterable
Data to predict on. Must fulfill input requirements of the underlying estimator. Returns ... | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.score_samples |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.set_params |
transform(X) [source]
Call transform on the estimator with the best found parameters. Only available if the underlying estimator supports transform and refit=True. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.halvingrandomsearchcv#sklearn.model_selection.HalvingRandomSearchCV.transform |
class sklearn.model_selection.KFold(n_splits=5, *, shuffle=False, random_state=None) [source]
K-Folds cross-validator Provides train/test indices to split data in train/test sets. Split dataset into k consecutive folds (without shuffling by default). Each fold is then used once as a validation while the k - 1 remaini... | sklearn.modules.generated.sklearn.model_selection.kfold#sklearn.model_selection.KFold |
sklearn.model_selection.KFold
class sklearn.model_selection.KFold(n_splits=5, *, shuffle=False, random_state=None) [source]
K-Folds cross-validator Provides train/test indices to split data in train/test sets. Split dataset into k consecutive folds (without shuffling by default). Each fold is then used once as a va... | sklearn.modules.generated.sklearn.model_selection.kfold |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsobject
Always ignored, exists for compatibility. Returns
n_split... | sklearn.modules.generated.sklearn.model_selection.kfold#sklearn.model_selection.KFold.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,), default=None
The targ... | sklearn.modules.generated.sklearn.model_selection.kfold#sklearn.model_selection.KFold.split |
sklearn.model_selection.learning_curve(estimator, X, y, *, groups=None, train_sizes=array([0.1, 0.33, 0.55, 0.78, 1.0]), cv=None, scoring=None, exploit_incremental_learning=False, n_jobs=None, pre_dispatch='all', verbose=0, shuffle=False, random_state=None, error_score=nan, return_times=False, fit_params=None) [source]... | sklearn.modules.generated.sklearn.model_selection.learning_curve#sklearn.model_selection.learning_curve |
sklearn.model_selection.LeaveOneGroupOut
class sklearn.model_selection.LeaveOneGroupOut [source]
Leave One Group Out cross-validator Provides train/test indices to split data according to a third-party provided group. This group information can be used to encode arbitrary domain specific stratifications of the samp... | sklearn.modules.generated.sklearn.model_selection.leaveonegroupout |
class sklearn.model_selection.LeaveOneGroupOut [source]
Leave One Group Out cross-validator Provides train/test indices to split data according to a third-party provided group. This group information can be used to encode arbitrary domain specific stratifications of the samples as integers. For instance the groups co... | sklearn.modules.generated.sklearn.model_selection.leaveonegroupout#sklearn.model_selection.LeaveOneGroupOut |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsarray-like of shape (n_samples,)
Group labels for the samples used whi... | sklearn.modules.generated.sklearn.model_selection.leaveonegroupout#sklearn.model_selection.LeaveOneGroupOut.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,), default=None
The targ... | sklearn.modules.generated.sklearn.model_selection.leaveonegroupout#sklearn.model_selection.LeaveOneGroupOut.split |
class sklearn.model_selection.LeaveOneOut [source]
Leave-One-Out cross-validator Provides train/test indices to split data in train/test sets. Each sample is used once as a test set (singleton) while the remaining samples form the training set. Note: LeaveOneOut() is equivalent to KFold(n_splits=n) and LeavePOut(p=1)... | sklearn.modules.generated.sklearn.model_selection.leaveoneout#sklearn.model_selection.LeaveOneOut |
sklearn.model_selection.LeaveOneOut
class sklearn.model_selection.LeaveOneOut [source]
Leave-One-Out cross-validator Provides train/test indices to split data in train/test sets. Each sample is used once as a test set (singleton) while the remaining samples form the training set. Note: LeaveOneOut() is equivalent t... | sklearn.modules.generated.sklearn.model_selection.leaveoneout |
get_n_splits(X, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yobject
Always ignored, exists for compati... | sklearn.modules.generated.sklearn.model_selection.leaveoneout#sklearn.model_selection.LeaveOneOut.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,)
The target variable fo... | sklearn.modules.generated.sklearn.model_selection.leaveoneout#sklearn.model_selection.LeaveOneOut.split |
class sklearn.model_selection.LeavePGroupsOut(n_groups) [source]
Leave P Group(s) Out cross-validator Provides train/test indices to split data according to a third-party provided group. This group information can be used to encode arbitrary domain specific stratifications of the samples as integers. For instance the... | sklearn.modules.generated.sklearn.model_selection.leavepgroupsout#sklearn.model_selection.LeavePGroupsOut |
sklearn.model_selection.LeavePGroupsOut
class sklearn.model_selection.LeavePGroupsOut(n_groups) [source]
Leave P Group(s) Out cross-validator Provides train/test indices to split data according to a third-party provided group. This group information can be used to encode arbitrary domain specific stratifications of... | sklearn.modules.generated.sklearn.model_selection.leavepgroupsout |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsarray-like of shape (n_samples,)
Group labels for the samples used whi... | sklearn.modules.generated.sklearn.model_selection.leavepgroupsout#sklearn.model_selection.LeavePGroupsOut.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,), default=None
The targ... | sklearn.modules.generated.sklearn.model_selection.leavepgroupsout#sklearn.model_selection.LeavePGroupsOut.split |
class sklearn.model_selection.LeavePOut(p) [source]
Leave-P-Out cross-validator Provides train/test indices to split data in train/test sets. This results in testing on all distinct samples of size p, while the remaining n - p samples form the training set in each iteration. Note: LeavePOut(p) is NOT equivalent to KF... | sklearn.modules.generated.sklearn.model_selection.leavepout#sklearn.model_selection.LeavePOut |
sklearn.model_selection.LeavePOut
class sklearn.model_selection.LeavePOut(p) [source]
Leave-P-Out cross-validator Provides train/test indices to split data in train/test sets. This results in testing on all distinct samples of size p, while the remaining n - p samples form the training set in each iteration. Note: ... | sklearn.modules.generated.sklearn.model_selection.leavepout |
get_n_splits(X, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yobject
Always ignored, exists for compati... | sklearn.modules.generated.sklearn.model_selection.leavepout#sklearn.model_selection.LeavePOut.get_n_splits |
split(X, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,)
The target variable fo... | sklearn.modules.generated.sklearn.model_selection.leavepout#sklearn.model_selection.LeavePOut.split |
class sklearn.model_selection.ParameterGrid(param_grid) [source]
Grid of parameters with a discrete number of values for each. Can be used to iterate over parameter value combinations with the Python built-in function iter. The order of the generated parameter combinations is deterministic. Read more in the User Guid... | sklearn.modules.generated.sklearn.model_selection.parametergrid#sklearn.model_selection.ParameterGrid |
sklearn.model_selection.ParameterGrid
class sklearn.model_selection.ParameterGrid(param_grid) [source]
Grid of parameters with a discrete number of values for each. Can be used to iterate over parameter value combinations with the Python built-in function iter. The order of the generated parameter combinations is d... | sklearn.modules.generated.sklearn.model_selection.parametergrid |
class sklearn.model_selection.ParameterSampler(param_distributions, n_iter, *, random_state=None) [source]
Generator on parameters sampled from given distributions. Non-deterministic iterable over random candidate combinations for hyper- parameter search. If all parameters are presented as a list, sampling without re... | sklearn.modules.generated.sklearn.model_selection.parametersampler#sklearn.model_selection.ParameterSampler |
sklearn.model_selection.ParameterSampler
class sklearn.model_selection.ParameterSampler(param_distributions, n_iter, *, random_state=None) [source]
Generator on parameters sampled from given distributions. Non-deterministic iterable over random candidate combinations for hyper- parameter search. If all parameters a... | sklearn.modules.generated.sklearn.model_selection.parametersampler |
sklearn.model_selection.permutation_test_score(estimator, X, y, *, groups=None, cv=None, n_permutations=100, n_jobs=None, random_state=0, verbose=0, scoring=None, fit_params=None) [source]
Evaluate the significance of a cross-validated score with permutations Permutes targets to generate ‘randomized data’ and compute... | sklearn.modules.generated.sklearn.model_selection.permutation_test_score#sklearn.model_selection.permutation_test_score |
class sklearn.model_selection.PredefinedSplit(test_fold) [source]
Predefined split cross-validator Provides train/test indices to split data into train/test sets using a predefined scheme specified by the user with the test_fold parameter. Read more in the User Guide. New in version 0.16. Parameters
test_foldar... | sklearn.modules.generated.sklearn.model_selection.predefinedsplit#sklearn.model_selection.PredefinedSplit |
sklearn.model_selection.PredefinedSplit
class sklearn.model_selection.PredefinedSplit(test_fold) [source]
Predefined split cross-validator Provides train/test indices to split data into train/test sets using a predefined scheme specified by the user with the test_fold parameter. Read more in the User Guide. New in... | sklearn.modules.generated.sklearn.model_selection.predefinedsplit |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsobject
Always ignored, exists for compatibility. Returns
n_split... | sklearn.modules.generated.sklearn.model_selection.predefinedsplit#sklearn.model_selection.PredefinedSplit.get_n_splits |
split(X=None, y=None, groups=None) [source]
Generate indices to split data into training and test set. Parameters
Xobject
Always ignored, exists for compatibility.
yobject
Always ignored, exists for compatibility.
groupsobject
Always ignored, exists for compatibility. Yields
trainndarray
The tra... | sklearn.modules.generated.sklearn.model_selection.predefinedsplit#sklearn.model_selection.PredefinedSplit.split |
class sklearn.model_selection.RandomizedSearchCV(estimator, param_distributions, *, n_iter=10, scoring=None, n_jobs=None, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', random_state=None, error_score=nan, return_train_score=False) [source]
Randomized search on hyper parameters. RandomizedSearchCV implements... | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV |
sklearn.model_selection.RandomizedSearchCV
class sklearn.model_selection.RandomizedSearchCV(estimator, param_distributions, *, n_iter=10, scoring=None, n_jobs=None, refit=True, cv=None, verbose=0, pre_dispatch='2*n_jobs', random_state=None, error_score=nan, return_train_score=False) [source]
Randomized search on hy... | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv |
decision_function(X) [source]
Call decision_function on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports decision_function. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.decision_function |
fit(X, y=None, *, groups=None, **fit_params) [source]
Run fit with all sets of parameters. Parameters
Xarray-like of shape (n_samples, n_features)
Training vector, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples, n_output) or (n_samples,), def... | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.fit |
get_params(deep=True) [source]
Get parameters for this estimator. Parameters
deepbool, default=True
If True, will return the parameters for this estimator and contained subobjects that are estimators. Returns
paramsdict
Parameter names mapped to their values. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.get_params |
inverse_transform(Xt) [source]
Call inverse_transform on the estimator with the best found params. Only available if the underlying estimator implements inverse_transform and refit=True. Parameters
Xtindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.inverse_transform |
predict(X) [source]
Call predict on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.predict |
predict_log_proba(X) [source]
Call predict_log_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_log_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.predict_log_proba |
predict_proba(X) [source]
Call predict_proba on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports predict_proba. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.predict_proba |
score(X, y=None) [source]
Returns the score on the given data, if the estimator has been refit. This uses the score defined by scoring where provided, and the best_estimator_.score method otherwise. Parameters
Xarray-like of shape (n_samples, n_features)
Input data, where n_samples is the number of samples and ... | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.score |
score_samples(X) [source]
Call score_samples on the estimator with the best found parameters. Only available if refit=True and the underlying estimator supports score_samples. New in version 0.24. Parameters
Xiterable
Data to predict on. Must fulfill input requirements of the underlying estimator. Returns ... | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.score_samples |
set_params(**params) [source]
Set the parameters of this estimator. The method works on simple estimators as well as on nested objects (such as Pipeline). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object. Parameters
**paramsdict
Es... | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.set_params |
transform(X) [source]
Call transform on the estimator with the best found parameters. Only available if the underlying estimator supports transform and refit=True. Parameters
Xindexable, length n_samples
Must fulfill the input assumptions of the underlying estimator. | sklearn.modules.generated.sklearn.model_selection.randomizedsearchcv#sklearn.model_selection.RandomizedSearchCV.transform |
class sklearn.model_selection.RepeatedKFold(*, n_splits=5, n_repeats=10, random_state=None) [source]
Repeated K-Fold cross validator. Repeats K-Fold n times with different randomization in each repetition. Read more in the User Guide. Parameters
n_splitsint, default=5
Number of folds. Must be at least 2.
n_re... | sklearn.modules.generated.sklearn.model_selection.repeatedkfold#sklearn.model_selection.RepeatedKFold |
sklearn.model_selection.RepeatedKFold
class sklearn.model_selection.RepeatedKFold(*, n_splits=5, n_repeats=10, random_state=None) [source]
Repeated K-Fold cross validator. Repeats K-Fold n times with different randomization in each repetition. Read more in the User Guide. Parameters
n_splitsint, default=5
Num... | sklearn.modules.generated.sklearn.model_selection.repeatedkfold |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility. np.zeros(n_samples) may be used as a placeholder.
yobject
Always ignored, exists for compatibility. np.zeros(n_samples) may be use... | sklearn.modules.generated.sklearn.model_selection.repeatedkfold#sklearn.model_selection.RepeatedKFold.get_n_splits |
split(X, y=None, groups=None) [source]
Generates indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,)
The target variable f... | sklearn.modules.generated.sklearn.model_selection.repeatedkfold#sklearn.model_selection.RepeatedKFold.split |
class sklearn.model_selection.RepeatedStratifiedKFold(*, n_splits=5, n_repeats=10, random_state=None) [source]
Repeated Stratified K-Fold cross validator. Repeats Stratified K-Fold n times with different randomization in each repetition. Read more in the User Guide. Parameters
n_splitsint, default=5
Number of f... | sklearn.modules.generated.sklearn.model_selection.repeatedstratifiedkfold#sklearn.model_selection.RepeatedStratifiedKFold |
sklearn.model_selection.RepeatedStratifiedKFold
class sklearn.model_selection.RepeatedStratifiedKFold(*, n_splits=5, n_repeats=10, random_state=None) [source]
Repeated Stratified K-Fold cross validator. Repeats Stratified K-Fold n times with different randomization in each repetition. Read more in the User Guide. ... | sklearn.modules.generated.sklearn.model_selection.repeatedstratifiedkfold |
get_n_splits(X=None, y=None, groups=None) [source]
Returns the number of splitting iterations in the cross-validator Parameters
Xobject
Always ignored, exists for compatibility. np.zeros(n_samples) may be used as a placeholder.
yobject
Always ignored, exists for compatibility. np.zeros(n_samples) may be use... | sklearn.modules.generated.sklearn.model_selection.repeatedstratifiedkfold#sklearn.model_selection.RepeatedStratifiedKFold.get_n_splits |
split(X, y=None, groups=None) [source]
Generates indices to split data into training and test set. Parameters
Xarray-like of shape (n_samples, n_features)
Training data, where n_samples is the number of samples and n_features is the number of features.
yarray-like of shape (n_samples,)
The target variable f... | sklearn.modules.generated.sklearn.model_selection.repeatedstratifiedkfold#sklearn.model_selection.RepeatedStratifiedKFold.split |
class sklearn.model_selection.ShuffleSplit(n_splits=10, *, test_size=None, train_size=None, random_state=None) [source]
Random permutation cross-validator Yields indices to split data into training and test sets. Note: contrary to other cross-validation strategies, random splits do not guarantee that all folds will b... | sklearn.modules.generated.sklearn.model_selection.shufflesplit#sklearn.model_selection.ShuffleSplit |
sklearn.model_selection.ShuffleSplit
class sklearn.model_selection.ShuffleSplit(n_splits=10, *, test_size=None, train_size=None, random_state=None) [source]
Random permutation cross-validator Yields indices to split data into training and test sets. Note: contrary to other cross-validation strategies, random splits... | sklearn.modules.generated.sklearn.model_selection.shufflesplit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.