4th-place solution to the Zindi/IndabaX Kenya Tech4MentalHealth NLP challenge — RoBERTa ensemble with grouped cross-validation.
# Tech4MentalHealth — NLP Classification
A four-class text classifier that categorises statements written by Kenyan
university students into **Depression, Alcohol, Suicide, or Drugs**, built for
the Zindi / IndabaX Kenya *Tech4MentalHealth* challenge. The eventual goal is a
mental-health chatbot prototype that routes a student's message to the right
kind of support.
**Result:** 4th place, log loss **0.359**.
## Approach
- **Baseline:** TF-IDF (word + character n-grams) with logistic regression.
- **Transformers:** fine-tuned RoBERTa-base and RoBERTa-large, each averaged
over three random seeds to reduce variance on the small dataset.
- **Ensembling:** geometric blend of the models, with weights chosen on
out-of-fold predictions.
- **Validation:** 5-fold stratified *group* cross-validation (grouped on
normalised text to prevent duplicate leakage). Local CV tracked the
leaderboard to within ~0.02 throughout.
See `documentation.md` for a full, beginner-friendly
write-up of the data, the metric, and every modelling decision.
## Data
The dataset is the property of Zindi and is **not included** in this repository,
per the competition rules. Download it from the
competition page if you are a participant, and place the
CSV files in a local `data/` folder (git-ignored).
## Repository
```
solution.ipynb model training, blending, and EDA (Colab notebook)
documentation.md full project write-up
README.md
```
## Tech
Python · scikit-learn · PyTorch · Hugging Face Transformers · pandas