Git Product home page Git Product logo

musicrecommendersystem's Introduction

What is it ?

  • This is a recommendation system based on Django

  • Mainly there are 3 algorithms uses:

a. UserCF(User-based Collaborative Flitering)

b. ItemCF(Item-based Collaborative Filtering)

c. LFM(Latent Factor Model)

This project mainly uses ItemCF as the recommend algorithm.

Project

Following the traditional MVC(Model/View/Control) architecture

Data Visualization

Google's highcharts library

data_visualization

recommend_item

recommend_result

The recommend principle is If more people like item A and item B at the same time, then item A and item B have obvious similarities.

In short, the basic similarity is calculated by a complex formula. You can the the implementation of codes in here

        for userID, items in trainset.items():
            for i in items:
                counter.setdefault(i, 0)
                counter[i] += 1
                simitems = simMatrix.setdefault(i, {})
                for j in items:
                    if not i == j:
                        simitems.setdefault(j, 0)
                        simitems[j] += 1

        for i, simitems in simMatrix.items():
            for j in simitems:
                simMatrix[i][j] /= math.sqrt(counter[i] * counter[j])

Crawl Data

A very important part of the recommender system is to get accumulation data from scratch called cold start.

The project used requests to build a multi-threaded crawler that extractedf Baidu music, kugou music, kuwoo music. After data cleaning (Removing the urls that are already dead links, there was a total of 100000 records used as train dataset.

Each music record includes UserID, music, url, rating. And the rating is based on the number of comments.

`0-500` : `1 point`
`500-1000` : `2 points`
`1000-2000` : `3 points`
`2000-3000` : `4 points`
`3000-more` : `5 points`(i.e. most popular)

Build real website
  • BackEnd: Django
  • FrontEnd: Bootstrap + JQuery(Ajax)
  • Deploy : Nginx+Gunicorn+Supervisor

musicrecommendersystem's People

Contributors

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