AnimatchxAI is a lightweight anime recommendation engine that uses content-based filtering to suggest similar anime based on genre, theme, and other features. It's designed to run locally on your Mac and provides immediate visual results without requiring super powerful hardware.
- Content-based recommendations using cosine similarity
- Clean, interactive interface with Jupyter widgets
- Genre and theme exploration tools
- Easy dataset swapping
- Local operation (no internet required after setup*)
- VS Code (Interactive IDE)
- Anaconda (Environment management)
- Python 3.11.x
- Pandas (data manipulation)
- Scikit-learn (TF-IDF and cosine similarity)
- Jupyter Notebooks (VS Code extension)
- Matplotlib (visualizations)
We're using the Anime Recommendation Database 2020 from Kaggle which contains:
- 12k+ unique anime entries
- Genre tags
- Type (Movie/TV)
- Episodes (number)
- Ratings (float)
# Install Python requirements using Anaconda
conda install pandas scikit-learn matplotlib ipywidgets jupyterlab
- Download dataset from Kaggle: https://www.kaggle.com/hernan4444/anime-recommendation-database-2020
- Place
anime.csv
in the project/data
directory
- Make sure you have the jupyter extension installed in VS Code.
- Open up VS Code and create your
anime_recommender.ipynb
- Or if you prefer Jupyter in the browser:
jupyter lab
Open Anime_Recommendation_Engine.ipynb
in Jupyter and run all cells
- Load and clean the dataset using Pandas
- Read the data/anime.csv, clean missing values and prepare the combined_features string for each anime.
- Convert text into numbers using TF-IDF
- TfidfVectorizer from sklearn turns each anime's combined_features string into a vecor of important words.
- More weight is given to rare, but meaningful terms.
- Compare the anime using cosine similarity
- cosine_similarity from sklearn measures how similar two anime vectors are on a scale from 0-1
- This creates a matrix saying:
"Anime X is 95% similar to Anime Y."
- Make recommendations
- When a user selects an anime:
- Find its row index in the dataset.
- Lookup the similarity scores from the matrix.
- Sort by highest similarity.
- Return the top
N
most similar results.
- When a user selects an anime:
get_recommendations("Attack on Titan")
1 Kabaneri of the Iron Fortress
2 The Promised Neverland
3 Seraph of the End
4 Vinland Saga
5 Tokyo Ghoul
Name: Name, dtype: object
- Adjust Recommendation Weighting:
# Give more weight to genres than members
anime['combined_features'] = anime['genre'] + " " + anime['genre'] + " " + anime['members']
- Add Rating Threshold:
# Only recommend shows with rating > 7.5
anime = anime[anime['rating'] > 7.5]
- Add user preference tracking
- Implement collaborative filtering
- Connect to Gremlin DB for relationship mapping
- Build web interface with Streamlit
Dataset not found:
- Verify
data/anime.csv
is in the same directory as the notebook - Check Kaggle download completed successfully
Memory issues:
- Should be no memory issues with the given dataset and libraries on standard device.
Installation issues:
- Use an Anaconda virtual environment