How ankur-one/student-performance-prediction works
Student Performance Prediction is a Streamlit application that predicts a student’s mathematics score from demographic details and reading/writing scores. The training workflow loads and splits the student dataset, preprocesses features, compares and tunes regression models, evaluates them, and saves the selected model and preprocessor. At runtime, the app collects inputs, builds a dataframe, applies the saved preprocessor and model, and displays the predicted score. Training wiring is evidenced by the executable in data_ingestion.py; cloud deployment is described in the README but its implementation is not shown.
Main entry points: data_ingestion.py Data ingestion · app.py Streamlit app · data_transformation.py Feature transformation · model_trainer.py Model trainer
Components 17
Prediction interface
- Streamlit app
app.py - Math score
Model training
- Data ingestion
src/components/data_ingestion.py - Feature transformation
src/components/data_transformation.py - Model trainer
src/components/model_trainer.py - Model evaluation
src/utils.py - Artifact saver
src/utils.py
Prediction runtime
- Input dataframe
src/pipeline/predict_pipeline.py - Predict pipeline
src/pipeline/predict_pipeline.py - Artifact loader
src/utils.py
Data and artifacts
- Student dataset
notebook/data/stud.csv - Raw data CSV
artifacts/data.csv - Training CSV
artifacts/train.csv - Test CSV
artifacts/test.csv - Preprocessor
artifacts/preprocessor.pkl - Selected model
artifacts/model.pkl
Other components
- Student
Connections 23
- Student → Streamlit app: enters details
- Streamlit app → Input dataframe: constructs input
- Input dataframe → Streamlit app: returns dataframe
- Streamlit app → Predict pipeline: requests prediction
- Predict pipeline → Artifact loader: loads artifacts
- Artifact loader → Preprocessor: reads
- Artifact loader → Selected model: reads
- Predict pipeline → Math score: returns prediction
- Streamlit app → Math score: displays
- Student dataset → Data ingestion: read by
- Data ingestion → Raw data CSV: writes
- Data ingestion → Training CSV: writes split
- Data ingestion → Test CSV: writes split
- Data ingestion → Feature transformation: calls
- Training CSV → Feature transformation: read by
- Test CSV → Feature transformation: read by
- Feature transformation → Preprocessor: saves
- Feature transformation → Model trainer: returns arrays
- Data ingestion → Model trainer: calls
- Model trainer → Model evaluation: evaluates models
- Model evaluation → Model trainer: returns scores
- Model trainer → Artifact saver: saves selected model
- Artifact saver → Selected model: writes