# define and execute grid-search # return training scores grid = GridSearchCV(Ridge(), param_grid, return_train_score=True) grid.fit(X_train, y_train) print(grid.best_score_) print(grid.best_params_)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter