daily notes[35]
·
LinearRegression
- there is a following model for Linear LinearRegression.

w 0 w_0 w0 above is intercept.
the following w is coef_.
2.it is used to achieve LinearRegression that minimizing the residual sum of squares between the observed targets and the targets predicted by the linear approximation.
from sklearn import linear_model
reg = linear_model.LinearRegression()
reg.fit([[10, 10], [11, 1], [12, 12]], [10, 11, 12])
print(reg.coef_)
print(reg.intercept_)
references
更多推荐

所有评论(0)