Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sklearn ridge regression

from sklearn.linear_model import Ridge
clf = Ridge(alpha=1.0)
clf.fit(X, y) #Fit Ridge regression model
clf.predict(X) #Predict using the model
clf.score(X_test, y_test) # r squared score on test sample
 
PREVIOUS NEXT
Tagged: #sklearn #ridge #regression
ADD COMMENT
Topic
Name
9+1 =