Distance Metric
- L1(Manhattan) distance: $d_1(I_1,I_2)=\sum\limits_p|I_1^p-I_2^p|$
- L2(Euclidean) distance: $d_2(I_1,I_2)=\sqrt{\sum\limits_p(I_1^p-I_2^p)^2}$
Simply by specifying different distance metrics, we can actually apply the k-nearest neighbor algorithm very generally to basically any type of data.
Hyperparameters
Hyperparameters: choices about the algorithm that we set rather than learn.
Setting hyperparameters:
- Choose hyperparameters that work best on the data ——> BAD
