Python Machine Learning Cookbook(Second Edition)
上QQ阅读APP看书,第一时间看更新

The grid search algorithm

The grid search algorithm does this by automatically looking for the set of hyperparameters that detracts from the best performance of the model.

The sklearn.model_selection.GridSearchCV() function performs an exhaustive search over specified parameter values for an estimator. Exhaustive search (also named direct search, or brute force) is a comprehensive examination of all possibilities, and therefore represents an efficient solution method in which every possibility is tested to determine whether it is the solution.