📅  最后修改于: 2022-03-11 14:46:39.752000             🧑  作者: Mango
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