Skip to content

Instantly share code, notes, and snippets.

@kshirsagarsiddharth
Created March 20, 2022 18:36
Show Gist options
  • Save kshirsagarsiddharth/07046fd470626f62201243650be154ae to your computer and use it in GitHub Desktop.
Save kshirsagarsiddharth/07046fd470626f62201243650be154ae to your computer and use it in GitHub Desktop.
fdd11
param_grid = {
'regressor__alpha': [0.1,1,10,0.01,0.01,5],
'regressor__l1_ratio': np.arange(0.40,1.00,0.10),
}
grid_search = GridSearchCV(reg, param_grid, cv=2)
grid_search.fit(X_train, y_train)
preds = grid_search.best_estimator_.predict(X_test)
score = np.sqrt(mean_squared_error(y_test, preds))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment