Skip to content

aadr22/Student-Performance-Prediction

Repository files navigation

Student Performance Predictor 📊

Python 3.9+ Flask scikit-learn License: MIT

A machine learning application that predicts students' mathematics performance based on various demographic and academic factors. Built with Python, Flask, and scikit-learn.

🎯 Features

  • Predicts mathematics scores using ML model
  • Web interface for easy data input
  • RESTful API endpoints
  • Detailed error handling
  • Input validation
  • Comprehensive logging

🛠️ Tech Stack

  • Python (ML & Backend)
  • Flask (Web Framework)
  • scikit-learn (ML Library)
  • Pandas (Data Processing)
  • NumPy (Numerical Operations)
  • HTML/CSS (Frontend)

📦 Installation

  1. Clone the repository:
git clone https://github.com/yourusername/student-performance-pred.git
cd student-performance-pred
  1. Create and activate virtual environment:
python -m venv venv
source venv/bin/activate  # Linux/Mac
venv\Scripts\activate     # Windows
  1. Install dependencies:
pip install -r requirements.txt
  1. Run the application:
python application.py

Visit http://localhost:5000 in your browser.

📁 Project Structure

├── .ebextensions/
├── artifacts/
├── catboost_info/
├── data/
├── logs/
├── mlproject.egg-info/
├── notebooks/
├── src/
│   ├── components/
│   │   ├── data_ingestion.py
│   │   ├── data_transformation.py
│   │   └── model_trainer.py
│   ├── pipeline/
│   │   ├── predict_pipeline.py
│   │   └── train_pipeline.py
│   ├── templates/
│   │   ├── home.html
│   │   └── index.html
│   ├── exception.py
│   ├── logger.py
│   └── utils.py
├── venv/
├── .gitignore
├── application.py
├── README.md
├── requirements.txt
└── setup.py

🚀 Usage

Web Interface

  1. Start the application
  2. Navigate to http://localhost:5000
  3. Fill in student information:
    • Gender
    • Race/Ethnicity
    • Parental Education
    • Lunch Type
    • Test Preparation
    • Reading Score
    • Writing Score
  4. Click "Predict" to get the mathematics score prediction

API Endpoint

POST /predictdata
Content-Type: application/json

{
    "gender": "male",
    "race_ethnicity": "group A",
    "parental_level_of_education": "bachelor's degree",
    "lunch": "standard",
    "test_preparation_course": "completed",
    "reading_score": 70,
    "writing_score": 75
}

🧪 Running Tests

python -m pytest tests/

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙋‍♂️ Author

Aadil Rahman

📧 Contact

For questions and feedback, please contact: aadil.rahman164@gmail.com


⭐️ If you found this project helpful, please give it a star!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages