Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

brian-analytics/swahili-news-classification

Domain:

natural language processing

Record type:

model
Creator:
bri
Host:
NLP model to classify Swahili news articles into 5 categories using TF-IDF and ensemble ML # Swahili News Classification A machine learning project that classifies Swahili news articles into 5 categories: **kitaifa** (national), **michezo** (sports), **biashara** (business), **kimataifa** (international), **burudani** (entertainment). ## Competition Zindi Africa. (zindi.africa) ## Approach - Text preprocessing (lowercase, remove digits/punctuation) - TF-IDF vectorisation (unigrams + bigrams, 100k features) - SMOTE oversampling to handle severe class imbalance - Ensemble of Logistic Regression + Calibrated SVC + Naive Bayes ## Results | Model | Validation Log Loss | |---|---| | Calibrated SVC | 0.3444 | | **Ensemble** | **0.3386** ← submitted | | Logistic Regression | 0.3540 | | Naive Bayes | 0.5754 | ## How to Run 1. Download `Train.csv` and `Test.csv` from the Zindi competition page 2. Place them in the same folder as the notebook 3. Run all cells top to bottom ## Requirements - pandas, numpy, scikit-learn, imbalanced-learn, matplotlib, seaborn ```

Visit

github.com

Tasks

news classificationtext classificationtopic classification

Languages

Swahili