April 2017
Intermediate to advanced
532 pages
12h 39m
English
You might recall from Chapter 5, Building a Recommendation Engine with Spark, that the similarity between two vectors can be computed using a distance metric. The closer two vectors are (that is, the lower the distance metric), the more similar they are. One such metric that we used to compute similarity between movies is cosine similarity.
Just like we did for movies, we can also compute the similarity between two documents. Using tf-idf, we have transformed each document into a vector representation. Hence, we can use the same techniques as we used for movie vectors to compare two documents.
Intuitively, we might expect two documents to be more similar to each other ...
Read now
Unlock full access