最小平方法求回归系数
                差别
这里会显示出您选择的修订版和当前版本之间的差别。
| 两侧同时换到之前的修订记录前一修订版后一修订版 | 前一修订版 | ||
| 最小平方法求回归系数 [2023/04/08 03:40] – zhangruihao | 最小平方法求回归系数 [2024/04/12 04:44] (当前版本) – 2104龚文滕 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| **最小平方法(least-squares solution)** | **最小平方法(least-squares solution)** | ||
| ---- | ---- | ||
| - | *最佳拟合线:目标是使误差最小,即这条线与所有的数据点最近。 | + |    | 
|   *回归线是给定X,a和b,用公式(线性方程)来预测Y的值。  |   *回归线是给定X,a和b,用公式(线性方程)来预测Y的值。  | ||
| - | *最小平方法:先求出每一个Y的实际值与预测值之间的距离并求平方,然后计算误差的平方和来确定直线和真实数据的总误差,与实际数据点误差平方和最小的直线就是最佳拟合线。 | + |    | 
| - | *最小二乘法(ordinary least squares, OLS) | + |    | 
| - | {{: | + | ***最小二乘法(ordinary least squares, OLS)** | 
| + | {{: | ||
| *SP为离差的乘积和,SSx为X的误差平方和,Sy和Sx分别是Y和X的标准差 | *SP为离差的乘积和,SSx为X的误差平方和,Sy和Sx分别是Y和X的标准差 | ||
| + | *矩阵形式:b = (X’X)^-1 X’y | ||
| + | |||
| + | ---- | ||
| + | ***Best fit line**:The goal is to minimize the error, which means that this line is closest to all data points. | ||
| + | *The regression line is used to predict the value of Y using the formula (linear equation) given X, a, and b. | ||
| + |   ***Least squares method**:First, | ||
| + |    | ||
| + | ***Ordinary least squares, OLS** | ||
| + | {{: | ||
| + | *SP is the product sum of deviations, SSx is the sum of squared errors of X, Sy and Sx are the standard deviations of Y and X, respectively | ||
| + | *Matrix form:b = (X’X)^-1 X’y | ||
最小平方法求回归系数.1680925201.txt.gz · 最后更改: 2023/04/08 03:40 由 zhangruihao