This is a Streamlit web application that predicts a student's writing score based on their math and reading scores using a Linear Regression model trained on the Students Performance Dataset.
Assumption: If a student performs well in math and reading, they will likely perform similarly in writing.
π Launch App on Streamlit https://studentscorepredictor-83dblgddhbjzylyez8sgoe.streamlit.app/
-
Predict Writing Score from Math and Reading Scores
-
Shows Model Accuracy (RΒ² Score) after prediction
-
Clean UI with interactive sliders
-
Uses Linear Regression for continuous prediction
-
Model is saved using pickle and re-used in production
-
Built with Streamlit, scikit-learn, pandas, NumPy, Matplotlib
student-score-app/
βββ app.py β Streamlit app
βββ train_model.py β One-time training script
βββ StudentsPerformance.csv β Dataset
βββ model.pkl β Pickled trained model
βββ X_test.pkl β Test data for accuracy display
βββ y_test.pkl
βββ requirements.txt β Python dependencies
βββ README.md β You are hereBased on the StudentsPerformance.csv dataset containing:
-
Categorical: gender, race/ethnicity, parental education, lunch, test preparation
-
Numerical: math, reading, writing scores
We assume writing score depends mostly on math and reading scores. So:
-
Features: math_score, reading_score
-
Target: writing_score
-
Encodes categorical variables
-
Normalizes numerical features
-
Trains a LinearRegression model
-
Saves:
-
model.pkl
-
X_test.pkl, y_test.pkl (for calculating RΒ² in production)
-
-
Loads model and test data
-
Takes input using sliders
-
Predicts writing score
-
Displays model performance (RΒ² Score)
git clone https://github.com/MansoobeZahra/Student_score_Predictor.git
cd student-score-app
pip install -r requirements.txt
# First: run training script
python train_model.py
# Then: run Streamlit app
streamlit run app.pypandas
numpy
scikit-learn
streamlitMansoob E Zehra | Pakistan | Computer Science Student| GitHub
This project is open-source and available under the MIT License.
