AI triage tool that predicts malaria risk from clinical symptoms using Random Forest. Built for low-resource healthcare environments.
# 🦟 AI-Driven Malaria Diagnostic Support System
> A Machine Learning approach to healthcare accessibility in low-resource environments.
---
## 📌 Motivation
In many regions of Central Asia and Africa, access to professional medical diagnostics is extremely limited. A patient may wait days before receiving a blood test.
This project explores whether a simple, lightweight Machine Learning model can help health workers **prioritize high-risk patients based on symptoms alone** — before a lab test is available. The goal is not to replace doctors, but to support triage decisions in resource-constrained environments.
---
## 🧠 How It Works
```
Patient symptoms (binary: yes/no)
│
▼
Data Preprocessing ──► Handle missing values (Imputation)
│
▼
Random Forest Classifier ──► Trained on 800 patient records
│
▼
Risk Probability (0–100%) ──► LOW / MODERATE / HIGH
│
▼
Triage Recommendation
```
---
## ⚙️ Technical Stack
| Component | Detail |
|-----------|--------|
| **Algorithm** | Random Forest Classifier |
| **Why RF?** | Works well with tabular/binary data, robust to noise in medical records |
| **Imbalance handling** | `class_weight='balanced'` — prevents model from predicting "Healthy" for everyone |
| **Missing values** | Median imputation — realistic for field conditions |
| **Libraries** | Python, Scikit-learn, Pandas, NumPy |
---
## 📊 Features (Symptoms)
| Feature | Type |
|---------|------|
| Fever | Binary (yes/no) |
| Chills | Binary (yes/no) |
| Sweating | Binary (yes/no) |
| Headache | Binary (yes/no) |
| Vomiting | Binary (yes/no) |
| Anaemia | Binary (yes/no) |
| Splenomegaly | Binary (yes/no) |
| Jaundice | Binary (yes/no) |
| Fatigue | Binary (yes/no) |
| Muscle Pain | Binary (yes/no) |
| Rapid Breathing | Binary (yes/no) |
| Age | Integer |
| Body Temperature (°C) | Float |
---
## 📈 Model Performance
- **Accuracy:** ~87%
- **Recall:** ~89% ← most important metric in medicine (don't miss sick patients)
- **Key insight:** Fever, splenomega …