How jerwingubat/ldaxgboostdemo works
This repository is a Flask-based student academic-standing and attrition-risk prediction web app. Its main workflow accepts student details and school-environment feedback, transforms them into model features, predicts an academic-standing label, and renders guidance. A separate batch workflow accepts CSV files and returns row-level predictions. The three sampled app files appear to be alternative implementations; the graph centers the more complete app.py implementation and includes the documented-in-source maintenance pages. Model artifacts and templates are shown as dependencies. No README was provided, so capabilities beyond the sampled apps cannot be confirmed.
Main entry points: app.py Single prediction · web_ready_xgboost_model.pkl XGBoost classifier · target_encoder.pkl Target label decoder · index.html Student input form
Components 20
Web workflows
- Flask app
app.py - Single prediction
app.py - Batch prediction
app.py - Maintenance pages
app.py - Uploaded CSV
uploads
Feature preparation
- Input encoding
app.py - Feedback preprocessing
app.py - Topic extraction
app.py
Prediction and guidance
- XGBoost classifier
web_ready_xgboost_model.pkl - Target label decoder
target_encoder.pkl - Risk guidance
app.py
Models and views
- Student input form
templates/index.html - Batch results view
templates/batch_predict.html - Maintenance view
templates/maintenance.html - Feature label encoders
label_encoders.pkl - Bigram model
bigram_mod.pkl - Trigram model
trigram_mod.pkl - Topic dictionary
lda_dictionary.gensim - LDA model
lda_model.gensim
Other components
- Student or staff
Connections 27
- Student or staff → Flask app: submits request
app.py - Flask app → Student input form: renders
app.py - Flask app → Single prediction: routes prediction
app.py - Flask app → Batch prediction: routes batch
app.py - Flask app → Maintenance pages: routes pages
app.py - Single prediction → Student input form: renders result
app.py - Batch prediction → Batch results view: renders results
app.py - Maintenance pages → Maintenance view: renders
app.py - Single prediction → Input encoding: encodes inputs
app.py - Single prediction → Feedback preprocessing: cleans feedback
app.py - Batch prediction → Uploaded CSV: saves upload
app.py - Batch prediction → Input encoding: encodes columns
app.py - Batch prediction → Feedback preprocessing: cleans feedback
app.py - Feedback preprocessing → Bigram model: applies
app.py - Feedback preprocessing → Trigram model: applies
app.py - Single prediction → Topic extraction: extracts topics
app.py - Batch prediction → Topic extraction: extracts topics
app.py - Topic extraction → Topic dictionary: creates bag of words
app.py - Topic extraction → LDA model: gets topic scores
app.py - Input encoding → Feature label encoders: uses
app.py - Single prediction → XGBoost classifier: predicts label
app.py - Batch prediction → XGBoost classifier: predicts rows
app.py - Single prediction → Target label decoder: decodes prediction
app.py - Batch prediction → Target label decoder: decodes predictions
app.py - Single prediction → Risk guidance: selects guidance
app.py - XGBoost classifier → Single prediction: returns prediction
app.py - XGBoost classifier → Batch prediction: returns predictions
app.py