Skip to content

Instantly share code, notes, and snippets.

@saaranshM
Last active December 16, 2020 11:37
Show Gist options
  • Save saaranshM/657e60753e266d4925d597edc820136e to your computer and use it in GitHub Desktop.
Save saaranshM/657e60753e266d4925d597edc820136e to your computer and use it in GitHub Desktop.
Training a model using Ridge Regression
from sklearn.linear_model import Ridge
ridge_reg = Ridge(alpha=1, solver="cholesky", random_state=42)
ridge_reg.fit(X, y)
# 'cholesky' is a matrix factorixation techinque used in the closed form equation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment