Small screen detected. You are viewing the mobile version of SlideWiki. If you wish to edit slides you will need to use a larger device.
Nearest neighbor method depends on a similarity (or distance) metric.
Simplest for continuous m-dimensional instance space is Euclidean distance.
Simplest for m-dimensional binary instance space is Hamming distance (number of feature values that differ).
For text, cosine similarity of tf.idf weighted vectors is typically most effective.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License