Giter Club home page Giter Club logo

basic-content-recommender-system's Introduction

بسم اللہ الرحمن الرحیم

Basic Recommender System

This repository contains a Basic Product Recommender Systen to be used with native and AWS EMR Hadoop. It's actually a collection of mapper and reducer files to be run on different stages in Hadoop or Amazon's AWS Elastic MapReduce.

This recommendation engine is based on Similarity matching (cosine similarity) algorithm.

Datasource

The data used for this engine is from MovieLens, I am using small data-set from MovieLens to include in GitHub Repo, but this program also works with the larger data-set from MovieLens. The data provided by MovieLens contains 4 CSV files

  1. links.csv: Provides relational data of Movie IDs against IMDB links
  2. movies.csv: Provides the details about all movies
  3. ratings.csv: Provides relational data of Movie IDs against individual ratings
  4. tags.csv: Provides relational data of Movie IDs against tags added by users per movie

Description

The workflow is broken in 4 stages (or 4 MapReduce Jobs) to allow more flexibility and control in making recommendations.

Stage-1: Calculating Average User Ratings

Because User Ratings are essential part in recommending a movie, so prior to further processing, average user ratings are needed, therefore we calculate average rating and total ratings number per movie id and store the interim result in output/stage-1-out.txt file.

Stage-2: Joining Average Ratings with Movies

After Stage-1, we join Average Ratings with the Movies listing itself provided in movies.csv. This is needed because we need to be able to relate a movie alongwith its average ratings and total number of ratings. Interim output is stored in output/stage-2-out.txt file.

Stage-3: Preparing list of Recommended Movies

Now since upto this step we have all the required data in our desired format, in this stage we perform the actual recommendation algorithm, based on Cosine Similarity. Here we consider Genre, Average Rating and Total Ratings as features or driving factors to calculate the similarity. This recommendation list is calculated against a Movie ID, and can be limited to output only few movies as recommendations. Interim output is stored in output/stage-3-out.txt file.

Stage-4: Makes Recommendation

Finally, we do reverse sorting over the recommended list, and recommend the top matches only, upto 12 recommendations. Final output is stored in output/final-out.txt file.

License

MIT

basic-content-recommender-system's People

Contributors

ammar-hasan avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

edson-github

basic-content-recommender-system's Issues

stage 4

mapper-4-make-recommendation.py
line 19 writer.writerow(row)
cause an IORrror: [errorno:32] broken pipe

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.