How ryanbusby/movierecommender works
This is a Flask movie-recommendation application backed by Spark ALS and MinHashLSH. Users search the movie catalog, submit ratings, and request recommendations; the app finds a similar trained user, gets that user’s ALS recommendations, and renders titles. A separate training path parses ratings, builds sparse user vectors, and fits the models. The tree omits the data and saved model artifacts, so those are shown as external stores. Template and frontend wiring is included where the excerpts show it; other runtime details may be unsampled.
Main entry points: app.py Flask routes · train.py Model training · engine.py Recommendation engine · movies.py Movie lookup
Components 18
Web application
- Flask routes
app.py - Autocomplete UI
static/js/form.js - Browse page
templates/index.html - Rating pages
templates/movies.html - Rate page
templates/rate.html - Results page
templates/results.html
Recommendation runtime
- Recommendation engine
engine.py - MinHash matching
engine.py - ALS recommendations
engine.py - Saved MinHash model
- Saved ALS model
- User vectors
Model training
- Ratings parser
src/parser.py - Model training
src/train.py - Netflix ratings
Movie catalog
- Movie lookup
movies.py - Movie titles
Other components
- Movie user
Connections 20
- Movie user → Flask routes: uses
README.md - Flask routes → Recommendation engine: requests recommendations
app.py - Flask routes → Movie lookup: looks up titles
app.py - Flask routes → Browse page: renders
app.py - Flask routes → Rating pages: renders
app.py - Flask routes → Rate page: renders
app.py - Flask routes → Results page: renders
app.py - Autocomplete UI → Flask routes: fetches suggestions
static/js/form.js - Recommendation engine → MinHash matching: finds neighbor
engine.py - MinHash matching → Saved MinHash model: queries
engine.py - MinHash matching → User vectors: compares vectors
engine.py - Recommendation engine → ALS recommendations: gets recommendations
engine.py - ALS recommendations → Saved ALS model: queries
engine.py - Model training → Ratings parser: parses ratings
src/train.py - Ratings parser → Netflix ratings: reads
src/parser.py - Model training → Saved ALS model: fits and saves
src/train.py - Model training → Saved MinHash model: fits and saves
src/train.py - Model training → User vectors: saves vectors
src/train.py - Flask routes → Movie lookup: loads catalog
app.py - Movie lookup → Movie titles: reads titles
movies.py