Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ Student Performance Prediction using Machine Learning

Python Pandas Matplotlib Scikit-Learn Streamlit License


πŸ“Œ Project Overview

Student Performance Prediction is an end-to-end Machine Learning project that predicts a student's exam score based on academic, personal, and environmental factors.

This project demonstrates the complete machine learning workflow, including:

  • πŸ“‚ Data Collection
  • 🧹 Data Cleaning & Preprocessing
  • πŸ“Š Exploratory Data Analysis (EDA)
  • πŸ“ˆ Data Visualization using Matplotlib
  • πŸ€– Machine Learning Model Training
  • πŸ“‰ Model Evaluation
  • πŸ’Ύ Model Saving using Joblib
  • 🌐 Interactive Web Application using Streamlit

🎯 Problem Statement

Educational institutions often face challenges in understanding which factors most significantly influence student academic performance.

This project aims to:

  • Analyze student performance factors
  • Identify relationships between features
  • Predict student exam scores
  • Provide an interactive prediction system

πŸ“Š Dataset

Student Performance Factors Dataset

The dataset contains multiple features affecting student performance, including:

  • Hours Studied
  • Attendance
  • Previous Scores
  • Sleep Hours
  • Motivation Level
  • Teacher Quality
  • Internet Access
  • Family Income
  • School Type
  • Gender
  • Parental Involvement
  • Physical Activity
  • Distance from Home
  • Learning Disabilities
  • Access to Resources

Target Variable

Exam_Score

πŸ›  Tech Stack

  • Python
  • Pandas
  • NumPy
  • Matplotlib
  • Scikit-Learn
  • Joblib
  • Streamlit
  • Jupyter Notebook
  • VS Code
  • Git & GitHub

πŸ“‚ Project Structure

Student_Performance_Project/
β”‚
β”œβ”€β”€ app.py
β”œβ”€β”€ README.md
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ .gitignore
β”‚
β”œβ”€β”€ data/
β”‚   β”œβ”€β”€ StudentPerformanceFactors.csv
β”‚   └── student_clean.csv
β”‚
β”œβ”€β”€ models/
β”‚   β”œβ”€β”€ student_performance_model.pkl
β”‚   └── feature_names.pkl
β”‚
β”œβ”€β”€ notebooks/
β”‚   └── analysis.ipynb
β”‚
β”œβ”€β”€ outputs/
β”‚   └── graphs/
β”‚
β”œβ”€β”€ screenshots/
β”‚
└── src/
    β”œβ”€β”€ preprocess.py
    β”œβ”€β”€ train.py
    └── predict.py

πŸ”„ Machine Learning Workflow

Dataset
   β”‚
   β–Ό
Data Cleaning
   β”‚
   β–Ό
Exploratory Data Analysis
   β”‚
   β–Ό
Feature Engineering
   β”‚
   β–Ό
Train-Test Split
   β”‚
   β–Ό
Random Forest Regressor
   β”‚
   β–Ό
Model Evaluation
   β”‚
   β–Ό
Model Saving
   β”‚
   β–Ό
Prediction
   β”‚
   β–Ό
Streamlit Web App

πŸ“Š Exploratory Data Analysis (EDA)

The project includes multiple visualizations using Matplotlib to understand the data and identify important trends.

πŸ“ˆ Exam Score Distribution

Exam Score


πŸ“š Hours Studied Distribution

Hours Studied


πŸ“ Attendance Distribution

Attendance


😴 Sleep Hours Distribution

Sleep Hours


πŸ“– Hours Studied vs Exam Score

Hours vs Score


πŸ“Š Attendance vs Exam Score

Attendance vs Score


πŸ”₯ Correlation Matrix

Correlation Matrix


🌟 Feature Importance

Feature Importance


🎯 Actual vs Predicted Scores

Actual vs Predicted


πŸ€– Machine Learning Model

Algorithm Used

βœ… Random Forest Regressor

Why Random Forest?

  • High prediction accuracy
  • Handles non-linear relationships
  • Robust against overfitting
  • Works well on tabular datasets
  • Provides feature importance

πŸ“ˆ Model Evaluation

The model is evaluated using:

  • Mean Absolute Error (MAE)
  • Mean Squared Error (MSE)
  • Root Mean Squared Error (RMSE)
  • RΒ² Score

🌐 Streamlit Web Application

The project also includes an interactive web application built using Streamlit.

Features

  • Enter student information
  • Predict exam score instantly
  • Clean and responsive interface
  • Machine learning powered prediction

Home Page

(Add screenshot)

screenshots/home.png

Prediction Result

(Add screenshot)

screenshots/result.png

πŸš€ Installation

Clone the repository

git clone https://github.com/pratimaasapkota/Student-Performance-Prediction.git

Move into the project directory

cd Student-Performance-Prediction

Install dependencies

pip install -r requirements.txt

Train the model

python src/train.py

Run prediction

python src/predict.py

Launch the Streamlit application

streamlit run app.py

πŸ“Œ Future Improvements

  • Hyperparameter tuning
  • Compare multiple ML models
  • Batch prediction using CSV upload
  • Online deployment with Streamlit Community Cloud
  • SHAP/LIME explainability
  • Advanced dashboard with Plotly
  • User authentication

πŸ“š Learning Outcomes

This project helped me gain practical experience in:

  • Data Cleaning
  • Exploratory Data Analysis (EDA)
  • Data Visualization
  • Feature Engineering
  • Machine Learning
  • Model Evaluation
  • Streamlit Application Development
  • End-to-End ML Pipeline
  • Git & GitHub Workflow

πŸ‘©β€πŸ’» Author

Pratima Sapkota

Computer Engineering Student

Interests

  • Artificial Intelligence
  • Machine Learning
  • Data Science
  • Deep Learning
  • Full Stack Development

⭐ Support

If you found this project useful, please consider giving it a ⭐ on GitHub.

It motivates me to build more AI and Machine Learning projects!


About

End-to-end Machine Learning pipeline for student performance prediction with data preprocessing, EDA, Random Forest, and Streamlit deployment.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages