Coder Social home page Coder Social logo

diclonius's Introduction

Dataset ๐Ÿงพ

The Dataset that we used for this task is the goodbooks-10k dataset. It consists of 10k books with a total of 6 million ratings. That's huge right! ๐Ÿ˜ฎ. There are some more huge datasets such as Book-Crossings but they are kinda old ๐Ÿ˜ฌ.

Dataset Structure

GoodBooks10k 
    โ”œโ”€โ”€ books.csv         # Contains book info with book-id                         
    โ”œโ”€โ”€ ratings.csv       # Maps user-id to book-id and rating  
    โ”œโ”€โ”€ book_tags.csv     # Contains tag-id associated with book-ids
    โ”œโ”€โ”€ tags.csv          # Contains tag-name associated with tag-id
    โ”œโ”€โ”€ to_read.csv       # Contains book-ids marked as to-read by user  

PreProcessing ๐Ÿ› 

Since this is a recommendation problem, we have to make sure that the books.csv is as clean as possible and only consider those ratings whose book-id is present, same goes for vice versa.

More Cleaning for books.csv

  • Missing Book Image URLs
  • Book & Rating Duplicates

Model Exploration ๐Ÿคฏ

For Recommendation Problems there are multiple approaches that are possible:

  • Embedding Matrix
  • Singular Matrix Decomposition
  • Term Frequency

We experimented with several methods and chose Embedding Matrix & Term Frequency.

  • Embedding Matrix - This method is often called FunkSVD which won the Netflix Prize back in 2004. Since it is a gradient based function minimization approach we like to call it as Embedding Matrix. Calling it SVD confuses it with the one in Linear Algebra. This Embedding Matrix constructs a vector for each user and each book, such that when the product is applied with additional constraints it gives us the rating. For more elaborate info on FunkSVD refer this. We used the book embedding as a representation of the books to infer underlying patterns. This led to the embedding able to detect books from the same authors and also infer genres such as Fiction, Autobiography and more.

  • Term Frequency - This method is like a helper function to above, it shines where embedding fails. Term Frequency takes into account the tokens in a book title be it the book title itself, the name of authors and also rating. Taking into consideration it finds books which match closely with the tokens in the rated book.

Final Result

The Image says it All.

coggle

Project Structure

Kitabe
โ”‚   
โ”œโ”€โ”€โ”€BookRecSystem               # Main Project Directory
โ”‚       
โ”œโ”€โ”€โ”€mainapp                     # Project Main App Directory
โ”‚   โ”‚   
โ”‚   โ””โ”€โ”€โ”€migrations              # Migrations
โ”‚           
โ”œโ”€โ”€โ”€static          
|   |                           # Static Directory
โ”‚   โ””โ”€โ”€โ”€mainapp
โ”‚       โ”œโ”€โ”€โ”€css                 # CSS Files  
|       |                         
โ”‚       โ”œโ”€โ”€โ”€dataset             # Dataset Files
โ”‚       โ”‚       
โ”‚       โ”œโ”€โ”€โ”€gif                 # GIF Media
โ”‚       โ”‚       
โ”‚       โ”œโ”€โ”€โ”€model_files         # Model Files
|       |   |      
โ”‚       โ”‚   โ”œโ”€โ”€โ”€surprise        # FunkSVD Files
โ”‚       โ”‚   โ”‚       
โ”‚       โ”‚   โ””โ”€โ”€โ”€cv              # CV Files
โ”‚       โ”‚           
โ”‚       โ””โ”€โ”€โ”€png                 # PNG Media FIles
|           
โ””โ”€โ”€โ”€templates                   # Root Template DIrectory
    |
    โ”œโ”€โ”€โ”€account                 # Account App Templates
    โ”‚       
    โ””โ”€โ”€โ”€mainapp                 # Project Main App Templates
               

diclonius's People

Contributors

dragonblood avatar deepsourcebot 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.