---
# System prepended metadata

title: lecture2_note
tags: [Lecture2]

---

###### tags: `Lecture2`
# lecture2_note

## KNN

kNN has a number of disadvantages:

- Very slow at test time
- Distance metrics on pixels are not informative

if will cause **"Curse of dimensionality"**：
![](https://i.imgur.com/JKnjKCk.png)

## Linear classification
![](https://i.imgur.com/798LEXS.png)

- xi has all of its pixels flattened out to a single column vector of shape [D x 1]. 
- The matrix W (of size [K x D])
- the vector b (of size [K x 1]) are the parameters of the function

 ![](https://i.imgur.com/y9lERxB.png)
 ![](https://i.imgur.com/LoSCVEk.png)
 
 
 ![](https://i.imgur.com/AZXgR4p.png)







