How plaggy/recommender_systems works
This repository prepares Yelp restaurant, review, and user data, then trains and evaluates either a collaborative-filtering LightFM recommender or a two-stage LightFM→LightGBM ranker. The main workflow is dataset preparation, interaction splitting/encoding, model fitting, candidate refinement (two-level mode), and AUC/MAP@K evaluation. The README documents additional two-level stages whose full implementation is not sampled; those capabilities are shown at the module level, with uncertain internal wiring omitted.
Main entry points: two_level_pipeline.py Two-level workflow · yelp_process.py Extract and filter data · main.py Model selection · lightfm_only.py Split and encode
Components 16
Yelp preparation
- Extract and filter data
yelp_process.py - Interactions and profiles
yelp_process.py - Restaurant features
yelp_process.py
Run selection
- Model selection
main.py
Recommendation models
- Split and encode
lightfm_only.py - LightFM model
lightfm_only.py - Two-level workflow
two_level_pipeline.py - Training and test sets
two_level_pipeline.py - Feature extraction
two_level_pipeline.py - Encoded interactions
two_level_pipeline.py - Candidate selection
two_level_pipeline.py - Refined candidates
two_level_pipeline.py - LightGBM ranker
two_level_pipeline.py
Evaluation
- AUC and MAP@K
utils.py
Other components
- Runner
- Yelp dataset
Connections 19
- Runner → Yelp dataset: provides
- Yelp dataset → Extract and filter data: reads
- Extract and filter data → Interactions and profiles: writes
- Extract and filter data → Restaurant features: writes
- Runner → Model selection: runs
- Model selection → Split and encode: selects LFM
- Model selection → Two-level workflow: selects pipeline
- Interactions and profiles → Split and encode: reads
- Split and encode → LightFM model: fits
- LightFM model → AUC and MAP@K: evaluated by
- Two-level workflow → Interactions and profiles: reads
- Two-level workflow → Restaurant features: reads
- Two-level workflow → Training and test sets: splits
- Two-level workflow → Feature extraction: extracts features
- Two-level workflow → Encoded interactions: encodes
- Two-level workflow → Candidate selection: scores candidates
- Candidate selection → Refined candidates: writes
- Two-level workflow → LightGBM ranker: trains
- LightGBM ranker → AUC and MAP@K: evaluated by