资 源 简 介
最小二乘法一般是用来拟合直线和一些线性数据的,就是用一条直线来尽可能的表达若干的点的趋势,当然直线穿过所有的点是最好的,但往往有误差存在,所以拟合出的直线要求误差最小.设这些点为(x1,y1),(x2,y2)....(xn,yn).拟合直线为y=kx+b.-Ordinary least squares method is used to fit a straight line and a number of linear data, that is, as far as possible with a straight line to the point of the expression of a number of trends, of course, a straight line through all the points is the best, but often there is a margin of error, Therefore, a straight line fitting the requirements of the smallest error. established for these points (x1, y1), (x2, y2 )....( xn, yn). fitting straight line y = kx+ b.