Giter Club home page Giter Club logo

recommendation-systems's Introduction

Recommendation-systems

My Skills

In the context of IDF (Inverse Document Frequency), "downscales" means that it reduces the importance or weight of words that appear frequently across documents. This is done to give more weight to words that are less common and potentially more informative for distinguishing between documents.

One of the original and straightforward methods for transforming texts into numerical values is TF-IDF. It's used to convert a collection of raw documents to a matrix of TF-IDF features. Let's break this down:

TF (Term Frequency): this summarizes how often a given word appears within a document IDF (Inverse Document Frequency): this downscales words that appear a lot across documents. A word that appears in many documents will not be a good keyword to categorize these documents because it does not help differentiate them TF-IDF are word frequency scores that try to highlight words that are more interesting, such as frequent in a document but not across documents. The TF-IDF value increases proportionally to the number of times a word appears in the document, but is offset by the frequency of the word in the corpus, which helps to adjust for the fact that some words appear more frequently in general.

In sklearn the TfidfVectorizer converts a collection of raw documents into a matrix of TF-IDF features. It's equivalent to CountVectorizer followed by TfidfTransformer.

Compute similarities

We need a similarity measure to compute how similar each Movie is to every other Movie. A common choice is the cosine similarity, which measures the cosine of the angle between two vectors. The closer the cosine similarity is to 1, the more similar the items are.

Create a function for recommendations

The function should take the title of a Movie and output recommendations. To get recommendations, we will get the index of the Movie in our DataFrame, get the list of cosine similarity scores for that Movie, and then sort the scores to get the indexes of the Movies with the highest similarity. We can then use these indexes to get the recommended Movies from our DataFrame.

My Skills

recommendation-systems's People

Contributors

bhasha03 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.