用 sklearn包中的 linear_model 实现多元线性回归

from sklearn import linear_model

reg = linear_model.LinearRegression()

reg.fit(example, label)

print("Coefficients of sklearn: W=%s, b=%f" % (reg.coef_, reg.intercept_))

其中example时特征值,label是标签

原文地址:https://www.cnblogs.com/bluesl/p/9215793.html