Logo Lanfrica

brian-analytics/swahili-news-classification

Domaine:

natural language processing

Type de record:

model
Créateur:
bri
Hôte:
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 ```