This repository has been archived on 2020-04-25. You can view files and clone it, but cannot push or open issues or pull requests.
ml/regression/README.md

63 lines
2.1 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 回归问题
## 线性回归
### 统计量:描述数据特征
#### 集中趋势衡量
- 均值(平均数、平均值)
- 中位数:排序,求中间数
- 众数:出现次数最多的数
#### 离散程度衡量
- 方差
- 标准差
### 简单线性回归
- 一个字变量、一个应变量
### 非线性回归
- 概率
## 逻辑回归
### 激活函数
#### Sigmoid函数
Sigmoid函数的定义:
![Sigmoid函数](https://img.zeekling.cn/images/2020/04/25/0df3d7ca7bcb0a4659502a5f6f63f6246b60af620198d7c0968827fa.png)
;导数为:
![sigmoid函数导数](https://img.zeekling.cn/images/2020/04/25/64380cd7912397dde41ab3095182b2b7d0a2875f4989e2f5b1bf96b7.png)
### 梯度上升算法
![梯度上升算法](https://img.zeekling.cn/images/2020/04/25/b5bf154051a65b231970f551bed57191.png)
此式便是梯度上升算法的更新规则,α是学习率,决定了梯度上升的快慢。可以看到与线性回归类似,只是增加了特征到结果
的映射函数。
### 梯度下降算法
### 非线性回归问题
### 回归中的相关度和决定系数
#### 皮尔逊相关系数Pearson Correlation Coefficient
1. 衡量两个值线性相关强度的量
2. 取值范围:[-1,1]:正向相关大于0负向相关小于 0,无相关性:=0
![计算公式](https://img.zeekling.cn/images/2020/04/25/0717a879f120b57862cebaeace46f5e4.jpg)
#### R平方值
1. 决定系数,反应因变量的全部变异能通过回归关系被自变量解释的比例
2. 如R平方为0.8则表示回归关系可以解释因变量80%的变异即如果自变量不变则因变量的变异程度会减少80%
3. 简单线性回归R^2=r*r
![ss](https://img.zeekling.cn/images/2020/04/25/32fd78dadf2891ceb2f29cb3030f1133.jpg)
![多元线性回归](https://img.zeekling.cn/images/2020/04/25/80015e9235614e88696e556dd624e75b.jpg)
##### R平方局限性
R平方随着自变量的增大会变大R平方和样本量是有关系的。所以需要对R平方进行修正修正方法为
![R平方局限性](https://img.zeekling.cn/images/2020/04/25/4c11e41fb2a2ee3f6560af6e9d37afa9.jpg)