Reader small image

You're reading from  Hands-On Recommendation Systems with Python

Product typeBook
Published inJul 2018
Reading LevelExpert
PublisherPackt
ISBN-139781788993753
Edition1st Edition
Languages
Right arrow
Author (1)
Rounak Banik
Rounak Banik
author image
Rounak Banik

Rounak Banik is a Young India Fellow and an ECE graduate from IIT Roorkee. He has worked as a software engineer at Parceed, a New York start-up, and Springboard, an EdTech start-up based in San Francisco and Bangalore. He has also served as a backend development instructor at Acadview, teaching Python and Django to around 35 college students from Delhi and Dehradun. He is an alumni of Springboard's data science career track. He has given talks at the SciPy India Conference and published popular tutorials on Kaggle and DataCamp.
Read more about Rounak Banik

Right arrow

The cosine similarity score

We will discuss similarity scores in detail in Chapter 5, Getting Started with Data Mining Techniques. Presently, we will make use of the cosine similarity metric to build our models. The cosine score is extremely robust and easy to calculate (especially when used in conjunction with TF-IDFVectorizer).

The cosine similarity score between two documents, x and y, is as follows:

The cosine score can take any value between -1 and 1. The higher the cosine score, the more similar the documents are to each other. We now have a good theoretical base to proceed to build the content-based recommenders using Python.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Hands-On Recommendation Systems with Python
Published in: Jul 2018Publisher: PacktISBN-13: 9781788993753

Author (1)

author image
Rounak Banik

Rounak Banik is a Young India Fellow and an ECE graduate from IIT Roorkee. He has worked as a software engineer at Parceed, a New York start-up, and Springboard, an EdTech start-up based in San Francisco and Bangalore. He has also served as a backend development instructor at Acadview, teaching Python and Django to around 35 college students from Delhi and Dehradun. He is an alumni of Springboard's data science career track. He has given talks at the SciPy India Conference and published popular tutorials on Kaggle and DataCamp.
Read more about Rounak Banik