A machine learning system that models and predicts student attention levels using behavioral simulation and regression modeling.
This project builds a student attention modeling and prediction system using:
- Behavioral simulation
- Synthetic dataset generation
- Machine Learning regression
- Visualization
- Flask-based web interface
The system models how a student’s attention varies during the day based on practical real-world factors such as sleep schedule, activity type, fatigue, environmental distractions, and biological focus cycles.
The goal is to:
- Simulate realistic student attention data
- Train a machine learning model
- Predict attention levels
- Recommend optimal study hours
- Model individual student attention using hidden behavioral variables
- Generate realistic datasets using practical assumptions
- Train a machine learning model to predict attention
- Identify best study times for students
- Provide visualization through graphs and a web interface
Student attention is influenced by multiple factors:
Hidden individual ability to focus.
Sleep duration and timing affect next-day attention.
- Textbook study → low distraction
- Mobile study → high distraction
- Coding / revision → moderate distraction
Long continuous study reduces attention while breaks help recovery.
Certain hours naturally have higher distractions.
Biological focus peaks during late morning hours.
The dataset is generated using practical behavioral rules.
- day
- student id
- hour
- activity type
- continuous study hours
- capacity (hidden variable)
- sleep start & end
- sleep duration
- sleep factor
- environmental factor
- biological factor
- fatigue factor
- final attention %
- Attention drops after long study sessions
- Mobile usage causes distraction spikes
- Breaks reduce fatigue
- Late sleep reduces morning attention
- Attention peaks naturally around late morning
Random Forest Regressor
- hour
- activity
- continuous study duration
- sleep factor
- environment factor
- biological factor
- fatigue factor
Predicted attention percentage.
- ✅ Synthetic realistic dataset generation
- ✅ Hidden-variable attention modeling
- ✅ Regression model training
- ✅ Attention prediction
- ✅ Best study hour recommendation
- ✅ Daily attention graph visualization
- ✅ Flask-based web interface
python generate_attention_dataset.pyCreates:
attention_dataset.csvpython train_model.pyCreates:
attention_model.pklpython app.pyOpen in browser:
http://127.0.0.1:5000- Daily attention graphs
- Predicted attention values
- Recommended best study hour
- Real student data integration
- Deep learning models
- Personalized study recommendations
- Mobile app interface
- Real-time attention tracking
- Siddharth
- Raghav
- Kishor Kumar
- Shri Vishwa D