Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disease Diagnosis Assistant CLI

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.


Problem Statement

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.


Features

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

Project Structure

disease_diagnosis/
│
├── main.py          
├── data.py         
├── model.py        
├── ui.py          
├── history.py    
└── requirements.txt 

Tech Stack

  • Language: Python 3
  • ML Model: Random Forest Classifier (scikit-learn)
  • Numerical Processing: NumPy
  • Storage: CSV (Python built-in)
  • Interface: Command Line Interface (CLI)

Setup & Installation

Step 1: Download the project

git clone <https://github.com/vaishnaviasati21/MedInsight>
cd disease_diagnosis

Step 2: Install dependencies

pip install -r requirements.txt

Step 3: Run the app

python main.py

No internet connection required after installation.


How to Use

  1. Run python main.py
  2. Choose Option 1 — Start New Diagnosis
  3. A numbered list of 20 symptoms appears
  4. Enter numbers separated by commas: 1,3,6,7
  5. View your results:
    • Top 3 predicted diseases with confidence %
    • Severity level
    • Home remedies
    • Doctor referral advice
  6. Optionally save the diagnosis to history
  7. Choose Option 2 to view all past diagnoses

Sample Output

=======================================================
         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!

ML Model Details

  • 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

requirements.txt

scikit-learn
numpy

Disclaimer

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.


Author

  • Name: Vaishnavi Asati
  • Course: Fundamentals of AI & ML
  • Platform: Vityarthi
  • Year: 1st Year B.Tech
  • Project Type: BYOP — Bring Your Own Project

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages