Kitabe (Book in Hindi) is a Book Recommendation System built for all you Book Lovers๐.
Simply Rate โญ some books and get immediate recommendations tailored for you ๐คฉ.
See Demo ๐ฅ
For Contributing ๐ and setting Up head here.
- Demo ๐ฅ
- Approach ๐ง
- Objective โ
- Dataset ๐งพ
- PreProcessing ๐
- Model Exploration ๐คฏ
- Final Result ๐
- Project Structure ๐โโ๏ธ
- To Do ๐ฏ
- Contribute ๐งโโ๏ธ
- Notebooks and Files ๐
- References ๐
- Contributors ๐ค
- License โ
Live Application ๐
Our objective is to build an application for all Book Lovers โฅ like us out there where all you have to do is rate some of your favorite books and the application will do it's voodoo magic ๐งโโ๏ธ and give you some more books that you may love๐ to read.
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
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
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.
๐ Code for every step can be found in the Notebooks and Files Section.
The Image says it All.
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
- Display Popular Books Among Users
- Add AJAX View Tests
- Add Model Tests
- Use a Better Approach than Count Vectorizer
- All Dataset & Model Files
- Cleaning and Embedding Notebook
- Fix Missing Images Notebook
- Genre Wise & Tfidf Vectorizer Notebook
MIT License
Copyright (c) 2020 Praful Mohanan & Prajakta Mane
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.