EduMetrics is a comprehensive, end-to-end Machine Learning web application designed to predict and analyze student performance. It features a robust ML pipeline under the hood, wrapped in a stunning, modern Neo-Brutalist user interface.
- 🎯 Score Prediction: Predict a student's math score based on features like gender, ethnicity, parental education, lunch type, test preparation, and other subject scores.
- 📊 Interactive Analytics Dashboard: A rich, visual dashboard built with Chart.js to explore the dataset. View distributions, correlations, and performance breakdowns by demographic.
- 🧠 Dynamic Model Training: Trigger the ML pipeline directly from the UI to retrain the model. Evaluates multiple algorithms (Random Forest, XGBoost, CatBoost, etc.) and visualizes feature importances live.
- 📄 PDF Report Generation: Export beautiful, styled PDF reports of both your single-student predictions (including dynamic advice) and the full analytics dashboard with one click.
- 🎨 Neo-Brutalist UI/UX: A highly stylized, high-contrast, responsive interface with custom CSS variables, sharp drop shadows, bold typography, and smooth micro-animations.
Machine Learning & Data Processing:
scikit-learn,pandas,numpyxgboost,catboost- Custom modular pipeline (Data Ingestion, Transformation, Model Trainer)
Backend:
Flask(Python Web Framework)joblib/dill(Model serialization)
Frontend:
- HTML5, Vanilla CSS3 (Custom Neo-Brutalist styling)
- JavaScript,
Chart.js(Visualizations),html2pdf.js(Client-side PDF generation)
DevOps & Deployment:
- Docker: Containerized for consistency across environments.
- GitHub Actions: Automated CI/CD pipeline for linting, testing, and continuous deployment.
- Render: Fully deployed cloud hosting.
Understanding how EduMetrics processes data from raw ingestion to the final web prediction.
This flowchart breaks down the internal src/ modules. It explains how raw data is ingested, transformed, and finally passed to the model trainer.
graph LR
subgraph Data Pipeline
A[(Raw Data CSV)] -->|data_ingestion.py| B[Train/Test Split Data]
B -->|data_transformation.py| C[Data Preprocessor]
C -->|Imputes & Scales| D[Transformed Data Array]
end
subgraph Model Training
D -->|model_trainer.py| E{Algorithm Selection}
E -->|Hyperparameter Tuning| F[Best Model Evaluated]
F --> G[(model.pkl)]
end
subgraph Prediction Pipeline
H[User Web Input] -->|predict_pipeline.py| I[CustomData Class]
I -->|Loads Preprocessor| J[Scaled Input]
J -->|Loads model.pkl| K[Final Score Prediction]
end
style A fill:#f87171,stroke:#000,color:#000
style G fill:#facc15,stroke:#000,color:#000
style H fill:#60a5fa,stroke:#000,color:#000
style K fill:#22c55e,stroke:#000,color:#000
- Data Ingestion: The
DataIngestioncomponent reads the raw dataset (CSV format), splits it into training and testing sets, and stores them in the artifacts directory. - Data Transformation: The
DataTransformationcomponent takes the split data, applies transformations (like handling missing values, encoding categorical variables, and scaling numerical variables), and saves this logic aspreprocessor.pkl. - Model Training: The
ModelTrainerscript receives the transformed arrays. It trains multiple regression models (XGBoost, CatBoost, Random Forest, etc.), tunes hyperparameters, selects the model with the highest R² score, and saves it asmodel.pkl. - Prediction: When a user inputs their data on the web UI, the
PredictPipelineloads bothpreprocessor.pklandmodel.pkl. It scales the incoming user data, runs it through the model, and returns the predicted score in real-time.
├── app.py # Flask Application entry point
├── requirements.txt # Python dependencies
├── Dockerfile # Docker image configuration
├── .github/workflows/ # GitHub Actions CI/CD workflows
├── artifacts/ # Serialized ML models and preprocessors (e.g., model.pkl)
├── notebook/ # Jupyter notebooks for EDA and model experimentation
├── src/ # Core Machine Learning package
│ ├── components/ # Ingestion, Transformation, and Trainer modules
│ ├── pipeline/ # Training and Prediction pipeline logic
│ ├── logger.py # Custom logging configuration
│ └── exception.py # Custom exception handling
└── templates/ # HTML/CSS Frontend templates
├── base.html # Global layout and Neo-Brutalist CSS styling
├── home.html # Prediction interface & report generator
├── analytics.html # Interactive Chart.js dashboard
└── train.html # Dynamic model retraining UI
Make sure you have Python 3.10+ and optionally Docker installed on your machine.
git clone https://github.com/yourusername/endTOendMLPROJECT.git
cd endTOendMLPROJECTpython -m venv .venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activatepip install -r requirements.txtIf you want to train the models from scratch and generate the model.pkl and preprocessor.pkl files:
python src/pipeline/train_pipeline.py(Alternatively, you can just click the "Start Training" button from the UI later!)
python app.pyVisit http://127.0.0.1:5000 in your browser.
You can also run the application using Docker, ensuring an identical environment to production.
# Build the Docker image
docker build -t edumetrics-app .
# Run the container
docker run -p 5000:8080 edumetrics-app(Note: The Dockerfile exposes port 8080, adjust mapping as necessary depending on your environment).