Skip to content

Latest commit

Β 

History

History
147 lines (118 loc) Β· 3.53 KB

File metadata and controls

147 lines (118 loc) Β· 3.53 KB

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!