Add. Summarization

pull/2/head
benjas 5 years ago
parent e3f482dd59
commit 241cd1ac09

@ -90,3 +90,54 @@ How to chose K
**在应用中** **在应用中**
先取一个较小的K值再通过交叉验证法来选取最优的K值 先取一个较小的K值再通过交叉验证法来选取最优的K值
### 分数表决规则
Majority voting rule
分类决策规则:多数表决
损失函数:![1618403216249](assets/1618403216249.png)
![1618403248798](assets/1618403248798.png)
实心圆内都判断为红色的损失值
![1618403277362](assets/1618403277362.png)
![1618403284982](assets/1618403284982.png)
实心圆内都判断为蓝色的损失值
![1618403333677](assets/1618403333677.png)
### K近邻算法
K-nearest neighbor
输入训练数据T = [(x1, y1),...,(xn,yn)]
![1618403482744](assets/1618403482744.png)实例特征向量x。
1. 根据给定的距离度量在训练集中找到与x最近的k个点涵盖这k个点的邻域记作Nk(x)
2. 在Nk(x)中根据分类决策规则如多少表决决定x的类别y
输出实例x所属的类别y
![1618403629320](assets/1618403629320.png)
### 总结
Summarization
1. K近邻的思想物以类聚
2. K近邻没有显式的训练过场
3. 距离度量:欧式距离、曼哈顿距离、切比雪夫距离
4. 分类方式:多数表决规则

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Loading…
Cancel
Save