Final thesis repository for Gabriel Long's INFO-I 492 project on whether bullying exposure variables improve prediction of persistent sadness or hopelessness in the 2023 national Youth Risk Behavior Survey.
Final manuscript: Read the complete thesis PDF.
- Primary outcome:
QN26/y_qn26 - Locked baseline covariates:
q1,q2,q3,raceeth - Bullying block:
QN24,QN25/x_qn24,x_qn25 - Evaluation frame: frozen held-out split plus frozen cross-validation folds under seed
2026
This repository is the canonical source of truth for the finished thesis workflow. It supports a bounded predictive analysis only. It does not make causal claims, does not add new datasets or outcomes, and is not a deployment package or screening tool.
- Selected model: Platt-calibrated histogram gradient boosting with the full predictor set (
hgb_full_platt). - Held-out performance: ROC AUC
0.716057, PR AUC0.644073, Brier score0.206122, and calibration slope1.005455. - Adding the bullying block versus the non-bullying HGB comparator improved held-out ROC AUC by
0.065857and PR AUC by0.106201. - The same ablation reduced held-out Brier score by
0.019046; these results are predictive, not causal or deployment-ready.
- Analysis-ready dataset construction from the local YRBS workbook
- Descriptive EDA with weighted prevalence context
- Baseline versus bullying-augmented predictive comparison
- Calibration review, model selection, and Week 7 robustness summaries
- Final presentation source materials in
presentation/ - Reproducible build logic for the curated submission package
data/: local working input policy and regenerated intermediate statedocs/: final technical documentation, methods notes, proposal-scope audit, and reproducibility guidancemanuscript/: final thesis manuscript in PDF formatoutputs/: curated aggregated metrics, tables, figures, split artifacts, and tuned-parameter JSON filespresentation/: final slide outline, speaker notes, and slide asset manifestscripts/: pipeline entrypoints and the submission-pack build scriptsrc/: reusable data, modeling, evaluation, and reporting codetests/: smoke tests for the retained pipeline and subgroup edge cases
The week-numbered script names are preserved from the course workflow chronology, but the repository contents reflect the final thesis state rather than interim draft checkpoints.
Run from the repository root after installing requirements.txt.
python3 scripts/00_validate_environment.pypython3 scripts/00_schema_audit.pypython3 scripts/01_build_dataset.pypython3 scripts/02_eda.py --outdir outputspython3 scripts/03_train_models.py --model logreg --features baseline --seed 2026 --calibration none --n_boot 0 --outdir outputspython3 scripts/03_train_models.py --model hgb --features baseline --seed 2026 --calibration none --n_boot 0 --outdir outputs --run-id week05_models_v1_seed2026_hgb_baseline_none --tune_hgb 1 --hgb_search_iter 12 --save_cv_preds 1 --enforce_frozen_artifacts 1 --week5_artifacts_only 1python3 scripts/04_week05_diagnostics.py --model hgb --baseline-model logreg --features baseline --seed 2026 --calibration none --outdir outputspython3 scripts/07_week06_pipeline.py --seed 2026 --outdir outputs- Optional Week 7 robustness summaries:
python3 scripts/09_multiseed_stability.py --outdir outputspython3 scripts/10_bootstrap_ci.py --outdir outputspython3 scripts/11_hyperparameter_sensitivity.py --outdir outputspython3 scripts/12_subgroup_audit.py --outdir outputs - Build the curated submission materials:
python3 scripts/20_build_submission_pack.py
- Frozen protocol artifacts in
outputs/splits/ - Held-out and cross-validation metric CSVs in
outputs/metrics/ - Comparison, calibration, missingness, prevalence, interpretability, and robustness tables in
outputs/tables/ - Curated thesis figures in
outputs/figures/ - Final presentation materials in
presentation/
Key result summaries are described in:
docs/modeling_report.mddocs/analysis_plan.mddocs/proposal_scope_alignment.md
- Expected raw workbook:
data/raw/YRBS_2023_MH_subset.xlsx - Regenerated parquet:
data/processed/yrbs_2023_modeling.parquet
The canonical repository keeps raw data and regenerated parquet local-only. The submission-pack build script can copy the local workbook and current processed parquet into the packaged Draft_Thesis_Submission_GabrielLong/Code/data/ tree when those files are present so the supplementary submission remains runnable without turning the live repository into a raw-data mirror.
The retained smoke tests are:
pytest -q tests/test_build_dataset_smoke.pypytest -q tests/test_eda_smoke.pypytest -q tests/test_week07_integrity_and_subgroup.py
See docs/reproducibility_checklist.md for the final rerun checklist and docs/proposal_scope_alignment.md for the concise proposal-to-final scope alignment note.