Machine Learning, Regression, Data Science.
straight flat line through data’s mean. Cost function to minimize for ridge/L2 regression from sklearn.linear_model import Ridge ridge_reg = Ridge(alpha=1, solver="cholesky") ridge_reg.fit(x_train, y_train) y_pred = ridge_reg.predict(y_test) Lasso regression (L1 Regularization): In Lasso, we