Hybrid Movie Recommendation Engine
TF-IDF content vectors fused with KNN collaborative filtering through a tunable weighted score.

What it is
What it does
Three notebooks, three recommenders. Content-based filtering builds stemmed metadata tags for 4,809 TMDB movies and ranks full-matrix cosine similarities; collaborative filtering runs brute-force cosine KNN over a sparsified user-rating matrix; the hybrid joins both result sets and sorts by a weighted score you can tune.
Why it exists
Content-based feels samey, collaborative dies on new movies with ten ratings. I kept both honest, side by side, then let a one-line weighted blend decide. You can see what each brings before they get mixed.
Repo Amit-kr26/MOVIE-RECOMMENDATION-USING-CONTENT-AND-COLLABORATIVE-BASED-FILTERINGStack Python · scikit-learn · TF-IDF · KNN · pandas
How it is built
Content pipeline
Overview + genres + keywords + top-3 cast + director become tags: multi-word names space-stripped ('Science Fiction' → ScienceFiction), Porter-stemmed, then TfidfVectorizer(stop_words='english') feeds a full 4809×4809 cosine similarity matrix.
Fuzzy lookup
difflib.get_close_matches resolves misspelled titles ('Intersteler' still works) before ranking; results return as the top 100 neighbours sorted by similarity.
Collaborative sparsification
The user×movie pivot drops noise first (movies need >10 ratings, users >50) then converts to a csr_matrix for NearestNeighbors(metric='cosine', algorithm='brute', n_neighbors=20), queried for 100 neighbours.
Title normalisation
Year suffixes are stripped from titles before matching so content-side and collaborative-side frames join cleanly.
Explicit hybrid weighting
hybrid.ipynb outer-joins both frames and computes HybridScore = 0.955 × similarity + 0.005 × distance. The weights sit at the top of the notebook as exposed constants.
How the pieces connect
Drawing is wider than the frame. Drag to pan.
Also filed under ML / DL