GithubHelp home page GithubHelp logo

collaborative-filtering-project's Introduction

Collaborative-Filtering-Project

This Project is developed by Rachesh Sharma and Subhankar Adak

doc2Vec.py: This file contains the code for the content based recommendation based on Doc2Vec. Installing NLTK and spacy is a prerequisite to run this code. This can be run independently.

tf_idf_based.py: This is for the tf-idf based vector implementation, Installing NLTK is a prerequisite to run the code.

metaDataBased_contentBased: This is the combination of both tf-idf and metadata based. The feature set creation code is commented out. Actual feature set is very large 4.5 GB. We can provide in case needed. This requires high RAM capacity to train.

opeartion.py : This file controls the evaluation part over popularity, region wise popularity, collaborative filtering both approaches, hybrid methods and clustered colaborative filtering

Once you run above files store operation class object in variable. operation class present in operation.py file

obj = operation()

Will contain dictionary corresponding to top 50 recommendation based on popularity of article in user region as well as in country

val50_true = obj.evaluation(interactions_train_df,interactions_test_df,50,True)

Will contain dictionary corresponding to top 50 recommendation based on overall popularity of article

val50_false = obj.evaluation(interactions_train_df,interactions_test_df,50,False)

Will contain dictionary corresponding to top 50 recommendation based on singular value decompositon approach

val50_cf = obj.evaluation(interactions_train_df,interactions_test_df,50,recommendartionType=4)

Will contain dictionary corresponding to top 50 recommendation based on NMF approach

val50_nmf = obj.evaluation(interactions_train_df,interactions_test_df,50,recommendartionType=2)

Will contain dictionary corresponding to top 50 recommendation based on hybrid clustering approach

val50_cfcluster = obj.evaluation(interactions_train_df,interactions_test_df,50,recommendartionType=3)

Will contain dictionary corresponding to top 50 recommendation based on hybrid weightage model

val50_hybrid = obj.latestHybridModelEvaluation(interactions_train_df,interactions_test_df,50,[5,5])

Each dictionary consist of userid as key and another dictionary as value. The value dictionary consist of predicted recommendation, actual recommendation, recall percentage for topk, count of match as numerator and length of actual recommendation as denominator key.

These dictionary passed through gloabRecallMethod to get global recall percentage, mean, median and percentage of user correctly recommended atleast 10% recommendation out of top k.

obj.globalRecallCalc(val50_hybrid)

collaborative-filtering-project's People

Contributors

rachesh 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.