📜  scikit 学习线性回归 - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:39.752000             🧑  作者: Mango

代码示例2
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