Knn slides (02) (Phương pháp Nearest Neighbor trong học máy) - Sebastian Raschka

UN
Uni24h
0 次下载
46
0

资料内容

第 1 页

Lecture 02 Nearest Neighbor Methods STAT 479: Machine Learning, Fall 2018 Sebastian Raschka http://stat.wisc.edu/~sraschka/teaching/stat479-fs2018/ 1

第 5 页

1-Nearest Neighbor Prediction Step closest_point := None closest_distance := for : current_distance := if current_distance < closest_distance: closest_distance := current_distance closest_point := return closest_point closest_point is the label of Sebastian Raschka STAT 479: Machine Learning FS 2018 !5

第 6 页

Commonly used: Euclidean Distance (L2) m 2 d(x[a],x[b]) = x[a] − x[b] ∑( j j ) j=1 Sebastian Raschka STAT 479: Machine Learning FS 2018 !6

第 10 页

a a Decision Boundary Between (a) and (c) d c Sebastian Raschka STAT 479: Machine Learning FS 2018 !10

第 13 页

Which Point is Closest? Euclid distan a c ? b Sebastian Raschka STAT 479: Machine Learning FS 2018 !13

第 14 页

a ? a ? b b Depends on the Distance Measure! Euclidean distance=1 Manhattan distance=1 a c ? ? b Sebastian Raschka STAT 479: Machine Learning FS 2018 !14

第 15 页

Continuous Distance Measures Euclidean Manhattan 1 Minkowski: m p p d(x[a],x[b]) = x[a] − x[b] [∑( ) ] j=1 Mahalanobis ... Sebastian Raschka STAT 479: Machine Learning FS 2018 !15

第 16 页

Discrete Distance Measures m Hamming: d(x[a],x[b]) = ∑ x[a] − x[b] j=1 Jaccard/Tanimoto Cosine similarity Dice ... Sebastian Raschka STAT 479: Machine Learning FS 2018 !16

第 17 页

Feature Scaling Euclidean Euclidean distance=1 distance=1 c c a ? a ? b b Euclidean Sebastian Raschka STAT 479: Machine Learning distance=1FS 2018Manhattan !17 distance=1

第 19 页

A y: Majority vote: Purality vote: B y: Majority vote: None Purality vote: Sebastian Raschka STAT 479: Machine Learning FS 2018 !19

第 20 页

kNN for Classification 𝒟 = {⟨x[1], f(x[1])⟩,…,⟨x[k], f(x[k])⟩} 𝒟k ⊆ 𝒟 k Sebastian Raschka STAT 479: Machine Learning FS 2018 !20

显示前 20 页。下载资料查看完整内容。

评论 (0)

登录 以加入讨论

暂无评论。快来抢沙发吧!