SpeakUp Payatas β Calibrated Random Forest Incident Classifier
Production-grade Tagalog/Taglish/English incident classifier and triage engine for Barangay Payatas, Quezon City, Philippines.
Developed for the SpeakUp Payatas community reporting platform.
Model Summary
- Architecture: 200-Tree Random Forest + CalibratedClassifierCV (Sigmoid)
- Features: Sublinear TF-IDF (Unigrams, Bigrams, Trigrams, max_features=12,000)
- Preprocessing: Tagalog slang normalizer (
SLANG_MAP), conservative verbal stemmer, Tagalog/English stop words filtering - Number of Categories: 22 Barangay Concern Classes
- Total Training Samples: 3,630 balanced samples (165 samples per class)
- Category Accuracy: 100.00% on held-out test split
- Urgency Accuracy: 99.82% on held-out test split
22 Supported Incident Categories & Routing
| Category Key | Category Label | Responding Department / Unit | Base Urgency |
|---|---|---|---|
safety_concern |
Crime & Violence | Police Station 13 / Area Patrol | HIGH |
threats_harassment |
Threats & Harassment | Police Station 13 / VAW Desk | HIGH |
fire_hazard |
Fire Hazard / Emergency | BDRRM Office / Fire Brigade | HIGH |
medical_health |
Medical Emergency | BHERT / Ambulance | HIGH |
road_traffic |
Traffic Congestion | Traffic Base Enforcers | MEDIUM |
road_accidents |
Vehicular Accident | Traffic Base / BDRRM Rescue | HIGH |
noise_nuisance |
Noise Disturbance / Videoke | CRO Office / Area Patrol | LOW |
electrical_concerns |
Electrical / Blackout / Wire | Meralco Emergency / Maintenance | MEDIUM |
animal_concerns |
Stray / Rabid Animals | BHERT Veterinary / Catching | MEDIUM |
family_domestic |
Domestic / VAWC Violence | ASH / VAW Desk / GAD | HIGH |
substance_concerns |
Illegal Drugs / Substance | BADAC / Police Station 13 | HIGH |
social_welfare |
Financial Aid / PWD / Senior | Secretary / DSWD / PDAO | MEDIUM |
legal_mediation |
Barangay Lupon Dispute | Lupon Tagapamayapa | MEDIUM |
infrastructure |
Damaged Road / Pothole / Bridge | Secretary / Engineering | LOW |
drainage_flooding |
Flooding / Clogged Drain / Pipe | BDRRM Office / Engineering | MEDIUM |
clearance_concerns |
Barangay Clearance & Permits | Clearance Department | LOW |
service_assistance |
Borrow Tents / Chairs / Tables | Secretary / Logistics | LOW |
environmental |
Environmental / Illegal Dumping | Environmental Protection | MEDIUM |
garbage_concerns |
Uncollected Garbage | Environmental Protection | LOW |
sanitation_health |
Sewage / Dirty Water / Odor | BHERT Health Inspection | MEDIUM |
inquiries |
Inquiries & Office Schedules | Secretary Information Desk | LOW |
other |
Other Concerns | Secretary / Triage | LOW |
Benchmark Validation Results
Tested against canonical real-world Tagalog resident reports:
| Input Text | Predicted Category | Confidence | Urgency |
|---|---|---|---|
| "Napakalakas ng videoke kaninang madaling araw hindi kami makatulog" | noise_nuisance |
96.7% | LOW |
| "May sunog po sa may bandang Phase 3 malapit sa talipapa tulong!" | fire_hazard |
79.4% | HIGH |
| "Pumutok po ang tubo ng tubig sa tapat ng bahay bumabaha na" | drainage_flooding |
97.7% | MEDIUM |
| "Nanghihingi po ako ng tulong pinansyal para sa gamot ng nanay ko" | social_welfare |
97.7% | MEDIUM |
| "Hindi pa nahahakot ang basura dito sa amin tatlong linggo na mabaho" | garbage_concerns |
84.1% | HIGH |
| "May nag-aaway sa kalsada may dalang patalim" | safety_concern |
97.2% | HIGH |
| "Madilim po ang poste ng ilaw sa kanto namin pundi na ang bumbilya" | electrical_concerns |
70.8% | HIGH |
| "May asong gala na nanghahabol ng mga bata sa kalsada" | animal_concerns |
92.8% | MEDIUM |
| "Nawalan po ng kuryente dahil sumabog ang transformer sa poste" | electrical_concerns |
96.4% | HIGH |
Reproducibility & Retraining
Run the included train.py script to generate fresh model artifacts:
python train.py