Machine Learning, Data Science, Pogramming, Statistics, Python.
4, 5, 6, 7, 8, 9]} ] pipeline = Pipeline(steps=[('poly', PolynomialFeatures()), ('ridge', Ridge())]) grid_search = GridSearchCV(pipeline, param_grid, cv=5, scoring='neg_mean_squared_error', return_train_score=True) grid_search.fit(x_train.reshape(-1, 1), y_train) Here we choose degrees from 2 to 8