A machine learning web application that predicts student exam scores based on various academic and personal factors. Built with Streamlit and Random Forest Regression.
Developed by: Ahmad Omar
This project uses a merged student performance dataset from Zenodo.
Dataset Information:
- Total Records: 14,003 students
- Total Features: 14 features
- Target Variable: Exam Score (0-100 scale)
- File Format: CSV (
merged_dataset.csv)
The model predicts a student's Exam Score on a scale of 0-100, representing their expected performance on an exam.
- 90-100 = Excellent (نایاب)
- 80-89 = Very Good (زۆر باش)
- 70-79 = Good (باش)
- 60-69 = Average (مامناوەند)
- Below 60 = Needs Improvement (پێویستی بە باشترکردن هەیە)
- 60 or above = Pass (تێپەڕ)
- Below 60 = Fail (شکست)
The model uses 14 factors to predict student performance, organized into the following categories:
- Gender - Student's gender (Male/Female)
- Age - Student's age
- Learning Style - Preferred learning method (Visual, Auditory, Kinesthetic, Reading/Writing)
- Motivation - Motivation level (Low, Medium, High)
- Study Hours - Hours studied per week
- Attendance - Attendance rate (%)
- Assignment Completion - Assignment completion rate (%)
- Online Courses - Number of online courses taken
- Discussions - Participation in discussions (Yes/No)
- Extracurricular - Engagement in extracurricular activities (Yes/No)
- Resources - Resource access level (Low, Medium, High)
- Internet - Internet access availability (Yes/No)
- EduTech - Use of educational technology (Yes/No)
- Stress Level - Stress level (Low, Medium, High)
The application supports two languages:
- 🇬🇧 English - Full English interface
- 🇹🇯 کوردی (Kurdish) - Complete Kurdish translation with RTL support
Users can switch between languages using the navigation buttons at the top of the page.
-
Clone the repository
git clone https://github.com/a7x3a/StudentPerformanceApp.git cd StudentPerformanceApp -
Create a virtual environment
python -m venv venv
-
Activate virtual environment
- Windows:
venv\Scripts\activate
- Linux/Mac:
source venv/bin/activate
- Windows:
-
Install dependencies
pip install -r requirements.txt
-
Download the dataset
- Ensure
merged_dataset.csvis in the project root directory - The dataset should contain 14 feature columns plus
ExamScoreandFinalGrade
- Ensure
python train.pyThis will:
- Load the dataset from
merged_dataset.csv - Train a Random Forest Regressor
- Save the model as
model.pkl - Display training and testing R² scores
Note: All features in the dataset are already numeric, so no encoding is required.
streamlit run app.pyThe application will open in your default web browser at http://localhost:8501
- Select your preferred language (English or Kurdish)
- Fill in all the required fields in the form:
- Demographic Information (Gender, Age, Learning Style, Motivation)
- Study Behaviors & Engagement (Study Hours, Attendance, Assignments, etc.)
- Resources & Technology (Resources, Internet, EduTech, Stress Level)
- Click "🔮 Predict Exam Score" (or "🔮 پێشبینی نمرەی تاقیکردنەوە" in Kurdish)
- View the predicted exam score (0-100) along with performance level and pass/fail status
StudentPerformanceApp/
│
├── app.py # Streamlit web application
├── train.py # Model training script
├── model.pkl # Trained Random Forest model
├── merged_dataset.csv # Dataset file (CSV format)
├── requirements.txt # Python dependencies
├── README.md # This file
└── venv/ # Virtual environment (not in git)
- Python 3.x
- Streamlit - Web application framework
- Pandas - Data manipulation
- Scikit-learn - Machine learning (Random Forest Regressor)
- Joblib - Model serialization
- Developer: Ahmad Omar (a7x3a.dev)
Note: Make sure the merged_dataset.csv file is in the project directory and the model has been trained (model.pkl exists) before running the application.