text_html_output_1.png
from sklearn.linear_model import Ridge, RidgeCV

import numpy as np

import numpy as np # linear algebra

from sklearn.linear_model import Ridge, RidgeCV
alphas = np.random.uniform(0, 10, 50)
ridge_cv = RidgeCV(alphas=alphas, cv=10, normalize=True)
ridge_cv.fit(X_train, y_train)

alpha = ridge_cv.alpha_
alpha

ridge = Ridge(alpha=ridge_cv.alpha_)
ridge.fit(X_train, y_train)