How hoanglong-88/predictive_modeling_human_stress works
Still is a local Flask demo for classifying submitted text as showing stress-related signals, with an optional probability estimate. Its main workflow is browser form submission → input validation → inference using the active serialized model → rendered result. A separate reproducibility workflow reads the documented Dreaddit archive, performs grouped cross-validation and model selection, evaluates the selected model, and writes model and metrics artifacts. The training workflow is grounded in train_model.py; the archive itself is absent from the tree, so its node has no repository path.
Main entry points: app.py Request handler · train_model.py Test evaluation · index.html Text form · stress_model.joblib Active model
Components 14
Web classification
- Text form
templates/index.html - Request handler
app.py - Input validation
app.py - Text inference
app.py - Rendered result
templates/index.html
Model training
- Dreaddit archive
- Split loading
train_model.py - Leakage grouping
train_model.py - Model search
train_model.py - Test evaluation
train_model.py
Model artifacts
- Active model
model/stress_model.joblib - Original model
model/stress_model.original.joblib - Audit metrics
model/metrics.json
Other components
- Text submitter
Connections 15
- Text submitter → Text form: submits text
README.md - Text form → Request handler: posts form
app.py - Request handler → Input validation: validates input
app.py - Request handler → Text inference: requests prediction
app.py - Text inference → Active model: loads model
app.py - Text inference → Request handler: returns prediction
app.py - Request handler → Rendered result: renders response
app.py - Dreaddit archive → Split loading: provides splits
train_model.py - Split loading → Leakage grouping: supplies training rows
train_model.py - Leakage grouping → Model search: supplies fold groups
train_model.py - Split loading → Model search: supplies train data
train_model.py - Model search → Test evaluation: provides selected model
train_model.py - Test evaluation → Active model: saves selected model
train_model.py - Test evaluation → Audit metrics: writes report
train_model.py - Original model → Test evaluation: baseline comparison
train_model.py