An AI-powered web application that detects a student's learning style based on quiz responses and behavioural interaction patterns, then recommends personalised study resources.
LearnSense AI uses machine learning to classify students into one of four VARK learning styles:
| Style | Description |
|---|---|
| 🟡 Visual | Learns best through diagrams, charts, and images |
| 🟢 Auditory | Learns best through lectures, podcasts, and discussions |
| 🔵 Reading/Writing | Learns best through text, notes, and written content |
| 🩷 Kinesthetic | Learns best through hands-on activities and movement |
- 🧠 Interactive Quiz — DSA, Python, and Java topic questions
- 🤖 ML Prediction — Random Forest model with 97.9% accuracy
- 📊 Model Dashboard — Confusion matrices, ROC curves, feature importance
- 🔍 SHAP Explainability — See why the model made its prediction
- 📚 Personalised Recommendations — Study techniques, resources, and platforms
- 📈 Engagement Tracking — Tracks click patterns, hesitation, and scroll depth
| Layer | Technology |
|---|---|
| Frontend | HTML, CSS, JavaScript |
| Backend | Python, Flask |
| ML Models | Scikit-learn (Random Forest, KNN, Decision Tree) |
| Explainability | SHAP |
| Data Processing | Pandas, NumPy |
| Deployment | Render |
Learning_Style_Detection/
├── app/
│ ├── models/ # Trained ML models (.pkl files)
│ │ ├── rf_model.pkl
│ │ ├── knn_model.pkl
│ │ ├── dt_model.pkl
│ │ ├── scaler.pkl
│ │ ├── label_encoder.pkl
│ │ ├── feature_engineer.pkl
│ │ └── results.json
│ ├── src/
│ │ ├── feature_engineering.py
│ │ ├── recommendation_engine.py
│ │ ├── explainability.py
│ │ ├── preprocessing.py
│ │ └── evaluate.py
│ ├── static/
│ │ └── images/ # SHAP plots, confusion matrices, etc.
│ ├── templates/
│ │ ├── index.html # Main app (Home, Quiz, Result, Profile)
│ │ └── dashboard.html # Model performance dashboard
│ ├── data/
│ │ └── raw/ # Student dataset
│ └── app.py # Flask application
├── notebooks/
│ └── EDA.ipynb # Exploratory Data Analysis
├── config.py # Configuration constants
├── requirements.txt
├── render.yaml # Render deployment config
└── README.md
- Python 3.11+
- pip
git clone https://github.com/Haripriya-clou/Learning_Style_Detection.git
cd Learning_Style_Detectioncd app
pip install -r requirements.txtpython app.pyhttp://127.0.0.1:5000
| Model | Accuracy | Precision | Recall | F1 Score |
|---|---|---|---|---|
| Decision Tree | 97.1% | 97.1% | 97.1% | 97.1% |
| Random Forest | 97.9% | 98.0% | 97.9% | 97.9% |
| KNN | 99.2% | 99.2% | 99.2% | 99.2% |
Random Forest is used for predictions due to its balance of accuracy and explainability via SHAP.
Student takes quiz
↓
Behavioral signals collected (clicks, time, scroll, hesitation)
↓
Feature engineering (engagement score, interaction density, etc.)
↓
Random Forest predicts learning style
↓
SHAP explains top contributing features
↓
Personalised recommendations displayed
| Feature | Description |
|---|---|
quiz_score |
Percentage of correct answers (0–100) |
time_spent_minutes |
Time taken to complete the quiz |
keystroke_speed |
Clicks per minute during quiz |
scroll_depth_percent |
How far the student scrolled |
click_count |
Total interactions during quiz |
hesitation_pauses |
Pauses >5 seconds between actions |
nav_pattern_score |
Navigation behaviour score (0–10) |
Deployed on Render — render.com
The app uses gunicorn as the production WSGI server:
gunicorn app:app
This project is developed for academic purposes as part of the BCS602 ML course