The Anime Recommendation System is an advanced recommendation engine powered by machine learning, designed to suggest anime titles based on user preferences. It employs collaborative filtering methods that utilize user rating data to generate predictions.
anime_recs.ipynb
The dataset used in this project contains anime metadata and user ratings, which Koggle provided for usage.
anime_id
: Unique identifier for each anime.name
: Anime title.genre
: Genre classification.type
: Format (TV, Movie, OVA, etc.).episodes
: Number of episodes.rating
: Average rating.members
: Number of members who rated the anime.user_id
: Unique identifier for users.anime_id
: Anime ID linked to anime.csv
.rating
: User rating (values range from 1-10, or -1 if not rated).To run the Jupyter Notebook, ensure the following libraries are installed:
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.metrics.pairwise import cosine_similarity
from sklearn.feature_extraction.text import TfidfVectorizer
from scipy.sparse import csr_matrix
from sklearn.neighbors import NearestNeighbors
Use the following command to install the required packages:
pip install numpy pandas scikit-learn seaborn matplotlib
Loading the Dataset:
anime.csv
and ratings.csv
into Pandas DataFrames.anime_df = pd.read_csv("anime.csv")
ratings_df = pd.read_csv("ratings.csv")
Cleaning the Data:
anime_df.dropna(inplace=True)
anime_df.drop_duplicates(inplace=True)