November 2018
Beginner to intermediate
348 pages
8h 32m
English
Up to this point, we had been using Euclidean distance as provided by the Marcin library. The Euclidean distance is computed as follows:
$ EuclideanDistance(\mathbf{q},\mathbf{p}) = \sqrt{\sum_{i=1}^n (q_i-p_i)^2}.$
The EuclideanDistance is a good metric to use when it comes to coordinates in a Cartesian space. Indeed, earlier I had drawn up an analogy of thinking of a tweet as a bunch of coordinates in space, to explain K-means and DBSCAN. The reality is that text documents aren't really in Cartesian space. You may think of them as being in Cartesian space, but they are not strictly so.
So, allow me to introduce another type of distance, one that is more suited to dealing with textual elements in a bag-of-words-style ...
Read now
Unlock full access