Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

scikit learn linear regression

from sklearn.linear_model import LinearRegression
reg = LinearRegression()
reg.score(X, y) #Fit linear model
reg.coef_ #Estimated coefficients for the linear regression problem
reg.predict(y) #Predict using the linear model
Source by scikit-learn.org #
 
PREVIOUS NEXT
Tagged: #scikit #learn #linear #regression
ADD COMMENT
Topic
Name
1+5 =