An end-to-end Machine Learning web application that analyzes student academic performance across multiple subjects to predict the most suitable educational stream (Science, Commerce/Arts, etc.) using a tuned Random Forest Classifier deployed via a Flask web server.
Choosing the right academic stream is a critical decision for students. This system leverages historical student marks data to build a predictive model. The workflow includes:
- Data Preprocessing & Feature Engineering: Cleaning marks datasets, merging categories (e.g., Commerce & Arts), one-hot encoding categorical features like gender, and applying Min-Max scaling across all core subjects.
- Model Training & Hyperparameter Tuning: Utilizing a
RandomForestClassifieroptimized viaGridSearchCVto maximize prediction accuracy. - Model Persistence: Saving the trained model using
pickle(stream_predict_final.pkl). - Web Deployment: A lightweight Flask application providing an intuitive web form for users to input grades and receive instant stream predictions.
Student-Stream-Prediction/
│
├── app.py # Flask web application server
├── stream_predict_final.pkl # Serialized/Trained Random Forest model
├── studentmarksheetupdated.xlsx# Historical student dataset
├── templates/
│ ├── index.html # Input form interface
│ └── prediction_result.html # Result rendering template
└── README.md # Project documentation
- Core Language: Python
- Machine Learning: Scikit-learn (
RandomForestClassifier,GridSearchCV,OneHotEncoder,MinMaxScaler, train/test splitting, metrics) - Data Processing: Pandas, NumPy
- Backend & Web Framework: Flask, Jinja2 Templates
- Model Serialization: Pickle
To run this application locally on your machine, follow these steps:
- Clone the repository:
git clone [https://github.com/Vighnesh1045/Student-Stream-Prediction.git](https://github.com/Vighnesh1045/Student-Stream-Prediction.git)
cd Student-Stream-Prediction
- Install required dependencies: Make sure you have Python installed, then install the necessary libraries:
pip install pandas scikit-learn flask openpyxl
- Verify Dataset & Model Paths:
Ensure
studentmarksheetupdated.xlsxandstream_predict_final.pklare located in your project directory (or update the file paths insideapp.pyto match your local file layout). - Run the Flask Application:
python app.py
- Access the App:
Open your web browser and navigate to:
http://127.0.0.1:5000/
- Features Evaluated: Gender, Maths, Physics, Chemistry, English, Biology, Economics, History, and Civics.
- Tuned Hyperparameters: Optimized via
GridSearchCVassessingn_estimators,max_depth, andmin_samples_split. - Evaluation Metrics: Evaluated using Accuracy Score, Confusion Matrix, Classification Report, and Feature Importance Rankings.
- Portfolio: vighnesh1045.github.io/portfolio
- LinkedIn: linkedin.com/in/vighnesh-anant-mhatre
- GitHub: github.com/Vighnesh1045