Skip to content

Latest commit

 

History

History
103 lines (73 loc) · 4.98 KB

README.md

File metadata and controls

103 lines (73 loc) · 4.98 KB

Book Recommending System

Coding Language and Library Used

How to run this project ?

  1. Open model.ipynb Jupyter notebook and run the Model.
  2. After running, you will have 2 pickle files.
  3. Run apptest.py using the command mentioned in the first line of code.
  4. Ensure all required libraries, especially Streamlit, are installed (use the latest pip libraries from here).
pip install numpy
pip install pandas
pip install scikit-learn
pip install nltk
pip install pickle5

Table of Contents

  1. Recommendation Systems
    1. Content Based Recommendation
    2. Collaborative Filtering
    3. Hybrid Filtering
  2. Data Preprocessing
  3. Choosing a Recommendation Algorithm
  4. Feature Extraction
  5. Data Preprocessing II
  6. Algorithm Application
    1. Euclidean Distance
    2. Cosine Similarity
  7. Deployment and User Interface

Recommendation Systems

A recommendation system predicts and presents items that a user might find relevant based on preferences and behavior.

  1. Content Based Recommendation

    • Principle: Recommends items similar to what the user has shown interest in.
    • Approach: Analyzes item characteristics and user preferences.
    • Example: Recommending movies based on genres or books based on content and genres.
  2. Collaborative Filtering

    • Principle: Recommends items based on the preferences and behaviors of similar users.
    • Approach: Utilizes user-item interaction data to identify patterns.
    • Example: Suggesting products liked or purchased by users with similar tastes.
  3. Hybrid Filtering

    • Principle: A combination of content-based and collaborative filtering.
    • Approach: Recommends items based on user history and similar users' recommendations.
    • Example: Facebook and LinkedIn use hybrid filtering for personalized content.

Data Preprocessing

Filter unnecessary data fields and remove duplicates and empty values for clean data.

Choosing a Recommendation Algorithm

Using the "Bag of Words" algorithm, a text representation technique converting titles, summaries, or reviews into a matrix of word frequencies.

Feature Extraction

Use book descriptions, authors' names, and genres to create a combined data field of tags for string matching.

Data Preprocessing II

Apply the Porter Stemmer algorithm for text stripping, reducing words to their root form and minimizing redundancy.

Algorithm Application

Utilize CountVectorizer to convert text into vectors based on word frequency, creating vectors from tags of all books.

  1. Euclidean Distance

    • Measures straight-line distance between two points in Euclidean space.
    • Sensitive to scale and affected by the curse of dimensionality.
  2. Cosine Similarity

    • Measures cosine of the angle between two vectors.
    • Scale-invariant and suitable for high-dimensional spaces.

Apply cosine similarity algorithm to get a similarity matrix. Create a function to return 6 nearest vectors with the least cosine distance.

Deployment and User Interface

Use Streamlit for the frontend, providing the easiest way to create a user interface for the Python application. Streamlit also offers free hosting for easy accessibility on any device with an internet browser.

Keep Coding, Keep Smiling!, Have Fun! 💻🚀