Skip to content

ArihantSingla21/Machine_Learning_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Student Performance Prediction

Overview

This machine learning project analyzes and predicts student performance based on various demographic and academic factors. The model aims to predict math scores using features like gender, race/ethnicity, parental education, lunch type, and test preparation course completion status. The project includes a web application for making predictions.

Table of Contents

Installation

1. Clone the repository

bash git clone https://github.com/ArihantSingla21/student-performance-prediction.git cd student-performance-prediction

2. Create a virtual environment

python -m venv venv

3. Activate virtual environment

- For Linux/Mac:

source venv/bin/activate

- For Windows:

venv\Scripts\activate

4. Install dependencies

pip install -r requirements.txt

Dataset

The dataset contains student performance information:

  • Size: 1000 students, 8 features
  • Features:
    • Gender
    • Race/ethnicity
    • Parental level of education
    • Lunch type
    • Test preparation course
    • Reading score
    • Writing score
    • Math score (target variable)
  • Preprocessing:
    • Categorical features encoded using OneHotEncoder
    • Numerical features scaled using StandardScaler
    • Data split into training (80%) and testing (20%) sets

Project Structure

  • notebook/
    • EDA.ipynb: Exploratory Data Analysis
    • MODEL TRAINING.ipynb: Model Training and Evaluation
  • data/
    • stud.csv: Raw dataset
  • src/
    • components/: Contains data ingestion, transformation, and model training modules
    • pipeline/: Contains prediction pipeline for web application
    • utils.py: Utility functions for saving models and evaluating performance
    • exception.py: Custom exception handling
    • logger.py: Logging configuration
  • templates/
    • home.html: Main prediction form interface
    • index.html: Landing page
  • artifacts/: Stores trained models and preprocessed data
  • application.py: Web application entry point
  • .ebextensions/: AWS Elastic Beanstalk configuration

Web Application

The project includes a web interface built with Flask that allows users to:

  • Input student information through a user-friendly form
  • Get instant predictions for math scores
  • Access the application through a deployed web service

To run the application locally:

python application.py

The application can be accessed at http://localhost:5000

Model Architecture

Multiple regression models were implemented and compared:

  • Linear Regression
  • Lasso Regression
  • Ridge Regression
  • Decision Tree Regressor
  • Random Forest Regressor

Key findings from EDA:

  • Students who completed the test preparation course showed higher average scores
  • Lunch type and gender showed correlations with performance
  • Clear patterns in score distributions across different demographic groups

Results

Model performance metrics include:

  • Mean Absolute Error (MAE)
  • Root Mean Square Error (RMSE)
  • R-squared (R2) score

Detailed performance metrics for each model are available in the training notebook.

Contributing

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/improvement)
  3. Make your changes
  4. Commit your changes (git commit -am 'Add new feature')
  5. Push to the branch (git push origin feature/improvement)
  6. Create a Pull Request

License

This project is licensed under the MIT License.


Created by ArihantSingla21

For questions or support, please open an issue or contact [arihantsingla21@gmail.com]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors