# Tech4MentalHealth — Zindi
Basic Needs Basic Rights Kenya · **Tech4MentalHealth**. Multiclass text
classification of student statements into `Depression`, `Alcohol`, `Suicide`,
`Drugs`. Metric: **multiclass Log Loss**.
## Layout
```
data/ Train.csv, Test.csv, SampleSubmission.csv (download from Zindi)
notebooks/
build_notebook.py generator for the baseline notebook
02_Baseline.ipynb reusable pipeline (TF-IDF -> LR -> CV -> OOF -> submission)
oof/ out-of-fold probabilities per experiment
submissions/ submission CSVs per experiment
experiments.csv our own leaderboard
```
### `experiments.csv` columns
`Experiment, TFIDF, Model, Hypothesis, CV_LogLoss, CV_Std, OOF_LogLoss, Submitted, Public_LB, Decision, Notes`
- **Hypothesis** — what the run tests and why.
- **Submitted** — ❌/✅; which runs consumed a daily Zindi submission.
- **Public_LB** — filled in by hand after submitting.
- **Decision** — auto against `BEAT_TARGET` (0.62381, the baseline): champion →
`Keep (champion)`, beats target → `Candidate`, else `Reject`. Manual values
(e.g. `Promote`, `Tune Further`) are preserved. **If a run doesn't beat the
target, we don't submit it.**
## Setup
```bash
pip install -r requirements.txt
```
Place `Train.csv`, `Test.csv`, `SampleSubmission.csv` in `data/`, then run
`notebooks/02_Baseline.ipynb` top-to-bottom (or
`jupyter nbconvert --to notebook --execute notebooks/02_Baseline.ipynb`).
## Pipeline
```
Text -> TF-IDF (fit per fold) -> Model -> Stratified 5-Fold CV
-> OOF predictions -> Log Loss -> submission
```
Key ideas:
- **Stratified 5-Fold, `random_state=42`, frozen `FOLDS`** shared by every
experiment so scores are directly comparable.
- **OOF predictions** saved for error analysis / calibration / ensembling.
- **Class column order is read from `SampleSubmission.csv`** and the model's
probability columns are reordered to match — avoids a silently-wrong Log Loss.
- No stemming / lemmatization / stopword removal (hurts on short te …