Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Personalized Learning Path Recommender

Tests

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.

Problem

Given a review's text, recommend the top 10 most relevant existing reviews (by index) from the training set as "learning paths."

Pipeline

  1. Clean review text (src/preprocess.py)
  2. Train a TF-IDF + Logistic Regression classifier to predict the course of a review (src/train_model.py)
  3. For each test review, predict its course, then retrieve the 10 most textually similar train reviews from that course (src/generate_submission.py)

Results

  • Validation macro recall: 1.0000
  • 5-fold CV macro recall: 1.0000 ± 0.0000 (see src/cross_validate.py) Confusion Matrix
  • Submission shape: 10977 x 2 (matches sample_submission.csv format)

Model Selection Note

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.

How to run

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
python3 src/train_model.py
python3 src/generate_submission.py

Project structure

learning-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

Interactive Demo

streamlit run src/app.py

About

Personalized learning path recommender using TF-IDF + Logistic Regression

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages