text_plain_output_1.png image_output_1.png
grid = {'alpha': [0.0001, 0.001, 0.01, 0.1, 1]}
cv = RepeatedStratifiedKFold(n_splits=5, n_repeats=3, random_state=42)
grid_search_lasso = GridSearchCV(estimator=lasso_reg, param_grid=grid, n_jobs=-1, cv=cv, scoring='accuracy', error_score=0)
grid_result_lasso = grid_search_lasso.fit(X_scaled, y)