A command-line AI-powered disease diagnosis tool built using Random Forest Machine Learning.
Developed as a BYOP (Bring Your Own Project) capstone for the Fundamentals of AI & ML course on Vityarthi.
People often face difficulty identifying common diseases from symptoms before visiting a doctor. This tool helps users get a preliminary AI-based assessment instantly — with confidence scores, home remedies, severity level, and doctor referral advice.
| Feature | Description |
|---|---|
| Symptom Selection | Choose from 20 symptoms via a numbered list |
| ML Prediction | Random Forest predicts top 3 possible diseases |
| Confidence Score | Visual bar showing prediction confidence % |
| Severity Level | MILD / MODERATE / HIGH classification |
| Home Remedies | Practical remedies for the diagnosed disease |
| Doctor Warning | Alert when immediate medical attention is needed |
| Save History | All diagnoses saved to CSV with date & time |
| View History | Review all past diagnoses from the menu |
disease_diagnosis/
│
├── main.py
├── data.py
├── model.py
├── ui.py
├── history.py
└── requirements.txt
- Language: Python 3
- ML Model: Random Forest Classifier (
scikit-learn) - Numerical Processing: NumPy
- Storage: CSV (Python built-in)
- Interface: Command Line Interface (CLI)
git clone <https://github.com/vaishnaviasati21/MedInsight>
cd disease_diagnosispip install -r requirements.txtpython main.pyNo internet connection required after installation.
- Run
python main.py - Choose Option 1 — Start New Diagnosis
- A numbered list of 20 symptoms appears
- Enter numbers separated by commas:
1,3,6,7 - View your results:
- Top 3 predicted diseases with confidence %
- Severity level
- Home remedies
- Doctor referral advice
- Optionally save the diagnosis to history
- Choose Option 2 to view all past diagnoses
=======================================================
DISEASE DIAGNOSIS ASSISTANT
Powered by Random Forest ML Model
=======================================================
SELECT YOUR SYMPTOMS
1. Fever 6. Sore Throat 11. Chest Pain ...
Enter symptom numbers: 1,2,6,7,18
-------------------------------------------------------
🔬 DIAGNOSIS RESULTS
Symptoms entered: Fever, Cough, Sore Throat, Body Ache, Chills
Top Predictions:
1. Influenza (Flu) ████████░░░░░░░░░░░░ 41.0%
2. Malaria ███░░░░░░░░░░░░░░░░░ 19.0%
3. COVID-19 ██░░░░░░░░░░░░░░░░░░ 14.0%
=======================================================
Most Likely : Influenza (Flu)
Confidence : 41.0%
Severity : MODERATE
=======================================================
HOME REMEDIES:
• Rest and sleep as much as possible
• Drink warm fluids — soup, herbal tea, honey water
• Steam inhalation to relieve congestion
• Ginger + tulsi tea helps soothe throat
DOCTOR REFERRAL: YES — Please consult a doctor soon!
- Algorithm: Random Forest Classifier
- Why Random Forest?: Handles multiple correlated symptoms well, resistant to overfitting, outputs probability scores for confidence %
- Input: Binary vector of 20 symptoms (1 = present, 0 = absent)
- Output: Disease label + probability scores for top 3 predictions
- Diseases Covered (9): Influenza, Common Cold, Food Poisoning, Dengue Fever, Malaria, Pneumonia, Allergic Reaction, Migraine, COVID-19
- Symptoms Covered (20): Fever, Cough, Cold, Headache, Fatigue, Sore Throat, Body Ache, Nausea, Vomiting, Diarrhea, Chest Pain, Breathlessness, Skin Rash, Itching, Joint Pain, Runny Nose, Loss of Appetite, Chills, Sweating, Dizziness
scikit-learn
numpy
This tool is for educational purposes only.
It is NOT a substitute for professional medical advice.
Always consult a qualified doctor for actual diagnosis and treatment.
- Name: Vaishnavi Asati
- Course: Fundamentals of AI & ML
- Platform: Vityarthi
- Year: 1st Year B.Tech
- Project Type: BYOP — Bring Your Own Project