How yakshini12/ml-recommendation-system works
This is a Flask movie-recommendation application with title-based content, collaborative, and hybrid lists, plus a genre-based popularity fallback. The visitor submits a title or genre; the app loads a recommender, requests the corresponding lists, and renders them. A separate offline workflow evaluates item recommendations using per-user holdouts. The README documents major model stages not fully visible in the excerpts; the graph uses it for those relationships and omits uncertain implementation details.
Main entry points: app.py Flask route · movies.csv Movie catalog · evaluate.py Holdout evaluator · model.py Data loading
Components 18
Web interface
- Flask route
app.py - Recommendation page
templates/index.html
Recommendation methods
- Content ranking
model.py - Genre TF-IDF
model.py - Collaborative ranking
model.py - Ratings matrix
model.py - Item KNN
model.py - Neighbor title mapping
model.py - Hybrid ranking
model.py - Genre popularity fallback
model.py
Catalog and ratings
- Data loading
model.py - Movie catalog
movies.csv - Demo ratings
data/demo_ratings.csv
Offline evaluation
- Holdout evaluator
evaluate.py - Per-user holdout split
evaluate.py - Precision and recall
evaluate.py
Other components
- Visitor
- External ratings CSV
Connections 26
- Visitor → Flask route: submits request
README.md - Flask route → Data loading: loads recommender
app.py - Data loading → Movie catalog: loads catalog
README.md - Data loading → Demo ratings: loads ratings
README.md - Flask route → Content ranking: requests title list
app.py - Flask route → Collaborative ranking: requests title list
app.py - Flask route → Hybrid ranking: requests title list
app.py - Flask route → Genre popularity fallback: requests genre list
app.py - Content ranking → Genre TF-IDF: ranks genre vectors
README.md - Movie catalog → Genre TF-IDF: supplies genres
README.md - Demo ratings → Ratings matrix: forms interactions
README.md - Ratings matrix → Item KNN: fits neighbors
README.md - Collaborative ranking → Item KNN: queries neighbors
README.md - Item KNN → Neighbor title mapping: maps neighbor IDs
README.md - Movie catalog → Neighbor title mapping: resolves titles
README.md - Content ranking → Hybrid ranking: provides scores
README.md - Collaborative ranking → Hybrid ranking: provides scores
README.md - Movie catalog → Genre popularity fallback: matches genres
README.md - Demo ratings → Genre popularity fallback: provides interaction counts
README.md - Flask route → Recommendation page: renders lists
app.py - External ratings CSV → Holdout evaluator: supplies ratings
README.md - Movie catalog → Holdout evaluator: supplies catalog
README.md - Holdout evaluator → Data loading: loads data
evaluate.py - Holdout evaluator → Per-user holdout split: creates holdout
evaluate.py - Holdout evaluator → Precision and recall: computes metrics
evaluate.py - Per-user holdout split → Precision and recall: provides held-out rows
evaluate.py