LinearRegression

  1. 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

  1. https://scikit-learn.org/stable/
Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐