diff --git a/assets/1604821754843.png b/assets/1604821754843.png new file mode 100644 index 0000000..73fbd18 Binary files /dev/null and b/assets/1604821754843.png differ diff --git a/assets/1604821811796.png b/assets/1604821811796.png new file mode 100644 index 0000000..deaead9 Binary files /dev/null and b/assets/1604821811796.png differ diff --git a/assets/1604821879046.png b/assets/1604821879046.png new file mode 100644 index 0000000..823faf2 Binary files /dev/null and b/assets/1604821879046.png differ diff --git a/assets/1604821982496.png b/assets/1604821982496.png new file mode 100644 index 0000000..ae058d3 Binary files /dev/null and b/assets/1604821982496.png differ diff --git a/assets/1604822042028.png b/assets/1604822042028.png new file mode 100644 index 0000000..f52bd4a Binary files /dev/null and b/assets/1604822042028.png differ diff --git a/assets/1604822227025.png b/assets/1604822227025.png new file mode 100644 index 0000000..905c0d3 Binary files /dev/null and b/assets/1604822227025.png differ diff --git a/assets/1604822255902.png b/assets/1604822255902.png new file mode 100644 index 0000000..a0f1b29 Binary files /dev/null and b/assets/1604822255902.png differ diff --git a/assets/1604822258878.png b/assets/1604822258878.png new file mode 100644 index 0000000..b6ab721 Binary files /dev/null and b/assets/1604822258878.png differ diff --git a/assets/1604822356847.png b/assets/1604822356847.png new file mode 100644 index 0000000..1e56d01 Binary files /dev/null and b/assets/1604822356847.png differ diff --git a/assets/1604822532101.png b/assets/1604822532101.png new file mode 100644 index 0000000..424377b Binary files /dev/null and b/assets/1604822532101.png differ diff --git a/assets/1604822559643.png b/assets/1604822559643.png new file mode 100644 index 0000000..1ed94ba Binary files /dev/null and b/assets/1604822559643.png differ diff --git a/assets/1604822595998.png b/assets/1604822595998.png new file mode 100644 index 0000000..0bac1ba Binary files /dev/null and b/assets/1604822595998.png differ diff --git a/assets/1604822649659.png b/assets/1604822649659.png new file mode 100644 index 0000000..f935638 Binary files /dev/null and b/assets/1604822649659.png differ diff --git a/assets/1604822675575.png b/assets/1604822675575.png new file mode 100644 index 0000000..8bb7196 Binary files /dev/null and b/assets/1604822675575.png differ diff --git a/必备数学基础.md b/必备数学基础.md index 4b45116..73f6b99 100644 --- a/必备数学基础.md +++ b/必备数学基础.md @@ -828,3 +828,65 @@ Sigmoid没有负数,都是大于0的,当梯度更新的时候,要么全为 - 同分布:他俩都是来同一银行,即我们假定的银行 - 高斯分布:银行可能会多给,也可能会少给,但是绝大多数情况下浮动不会太大,极小情况下浮动大,符合正常情况 +#### 最小二乘法推导与求解 + +- 预测值与误差![1604821754843](assets/1604821754843.png) + +- 由于误差服从高斯分布![1604821811796](assets/1604821811796.png) + +- 将(1)式代入(2)式:![1604821879046](assets/1604821879046.png) + + > 什么样的θ和x相乘后,得到最相近或者相同的y + +- 似然函数:![1604821982496](assets/1604821982496.png) + + 解释:什么样的参数和我们的数据组合后恰好是真实值 + +- 对数似然:![1604822042028](assets/1604822042028.png) + + 解释:乘法难解,加法就容易了,对数里乘法可以转换成加法 + +- 展开化简:![1604822227025](assets/1604822227025.png) + + ![1604822258878](assets/1604822258878.png) + +- 目标:让似然函数越大越好 + + ![1604822356847](assets/1604822356847.png) + + 最小二乘法 + +**参数的最小二乘法估计** + +对于回归直线,关键在于求解参数,常用高斯提出的最小二乘法,它使因变量的观察值y与估计值之间的离差平方和达到最小来求解。 + +![1604822532101](assets/1604822532101.png) + +![1604822559643](assets/1604822559643.png) + +展开得: + +![1604822595998](assets/1604822595998.png) + +求偏导可得: + +![1604822649659](assets/1604822649659.png) + +求解: + +![1604822675575](assets/1604822675575.png) + +实例:70年代世界制造业总产量与世界制成品总出口量的变化关系如表: + +| 年度 | 总产量年增长率(%) x | 总出口量年增长率(%) y | +| ---- | ------------------- | --------------------- | +| 1970 | 4.0 | 8.5 | +| 1971 | 4.0 | 8.0 | +| 1972 | 8.5 | 10.5 | +| 1973 | 9.5 | 15.5 | +| 1974 | 3.0 | 8.5 | +| 1975 | -1.0 | -4.5 | +| 1976 | 8.0 | 13.5 | +| 1977 | | | +| | | | +