Recommends the top-10 most relevant course reviews (learning paths) for a given learner review, using a two-stage TF-IDF classification + cosine similarity retrieval pipeline.
Given a review's text, recommend the top 10 most relevant existing reviews (by index) from the training set as "learning paths."
- Clean review text (
src/preprocess.py) - Train a TF-IDF + Logistic Regression classifier to predict the course
of a review (
src/train_model.py) - For each test review, predict its course, then retrieve the 10 most
textually similar train reviews from that course
(
src/generate_submission.py)
- Validation macro recall: 1.0000
- 5-fold CV macro recall: 1.0000 ± 0.0000 (see
src/cross_validate.py)
- Submission shape: 10977 x 2 (matches
sample_submission.csvformat)
Two pipelines were evaluated:
| Pipeline | Macro Recall | Time (single split) |
|---|---|---|
| TF-IDF (word, 1-2 grams) + Logistic Regression | 1.0000 | ~30s |
| Word + Char n-grams + LinearSVC | 1.0000 | ~745s |
Both achieve identical, perfect macro recall on this dataset. The simpler
Logistic Regression pipeline was kept as the primary solution since it
achieves the same score roughly 25x faster, with less complexity and
easier reproducibility. The char n-gram + LinearSVC experiment is
preserved in experiments/ for reference.
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 src/train_model.py
python3 src/generate_submission.pylearning-path-recommender/
├── data/ # train.csv, test.csv, sample_submission.csv
├── src/ # preprocess.py, train_model.py, generate_submission.py
├── outputs/ # generated submission.csv, saved model files
├── requirements.txt
└── README.md
streamlit run src/app.py