How especializacionia1/bolsalab works
BolsaLAB is an educational investment-risk companion: it estimates whether a respondent is more, similarly, or less likely than the study population to sell during a market downturn, and explains influential answers. The principal workflow is questionnaire → prediction and explanation → result in the Streamlit prototype. The repository also documents a proposed FastAPI API, but backend/ contains no implementation; the HTML frontend files are prototypes. Training and analysis capabilities are represented where README or source-index evidence supports them; unsampled subsystem links are omitted when their wiring is uncertain.
Main entry points: train.py Model training · config.py Paths and settings · app.py Questionnaire app · predict.py Prediction service
Components 19
User experience
- Questionnaire app
app/app.py - Proposed API
backend - HTML prototypes
frontend/prototypes
Prediction
- Prediction service
bolsalab/modeling/predict.py - Trained model
models/crash_reaction_v1.joblib - Model metadata
models/crash_reaction_v1.json - Model training
bolsalab/modeling/train.py
Data preparation
- Japan survey cleanup
bolsalab/dataset.py - Training features
bolsalab/features.py - Paths and settings
bolsalab/config.py
Model research
- Feature variants
bolsalab/modeling/transformers.py - Model experiments
bolsalab/modeling/experiments.py - Family tuning
bolsalab/modeling/tuning.py - Hyperparameter search
bolsalab/modeling/optuna_search.py - Early stopping
bolsalab/modeling/early_stopping.py
Evaluation
- Global SHAP analysis
bolsalab/explain.py - NFCS comparison data
bolsalab/nfcs.py - SCF panel processing
bolsalab/scf_panel.py
Other components
- Respondent
Connections 22
- Respondent → Questionnaire app: answers questions
README.md - Questionnaire app → Prediction service: requests prediction
app/app.py - Prediction service → Trained model: loads model
bolsalab/modeling/predict.py - Prediction service → Model metadata: loads metadata
bolsalab/modeling/predict.py - Questionnaire app → Proposed API: API proposed
README.md - Questionnaire app → HTML prototypes: prototype context
- Japan survey cleanup → Training features: provides cleaned data
README.md - Training features → Model training: provides training table
README.md - Model training → Trained model: exports model
bolsalab/modeling/train.py - Model training → Hyperparameter search: uses search
bolsalab/modeling/train.py - Model training → Family tuning: shares evaluation
bolsalab/modeling/train.py - Family tuning → Early stopping: uses stopping
bolsalab/modeling/tuning.py - Family tuning → Feature variants: tests variants
bolsalab/modeling/tuning.py - Model experiments → Model training: reuses evaluation
bolsalab/modeling/experiments.py - Model experiments → Feature variants: tests variants
bolsalab/modeling/experiments.py - Global SHAP analysis → Prediction service: uses model explainer
bolsalab/explain.py - NFCS comparison data → Training features: aligns variables
bolsalab/nfcs.py - SCF panel processing → Paths and settings: uses configured paths
bolsalab/scf_panel.py - Japan survey cleanup → Paths and settings: uses configured paths
bolsalab/dataset.py - Training features → Paths and settings: uses configured paths
bolsalab/features.py - Model training → Paths and settings: uses configured paths
bolsalab/modeling/train.py - NFCS comparison data → Paths and settings: uses configured paths
bolsalab/nfcs.py