Giter Site home page Giter Site logo

faizan-mushtaq / heart-disease-diagnosis Goto Github PK

View Code? Open in Web Editor NEW

This project forked from simplesaad/heart-disease-diagnosis

0.0 1.0 0.0 761 KB

Flask based web app to diagnose the patient using Python3

License: MIT License

HTML 77.59% Python 22.41%

heart-disease-diagnosis's Introduction

Heart-Disease-Diagnosis

Flask based web app to diagnose the patient using Python3, Predicts the presence of one of four types of heart disease(or none at all) using a patient's medical test report data.

Dataset

The Heart disease data set consists of patient data from Cleveland, Hungary, Long Beach and Switzerland. The combined dataset consists of 14 features and 916 samples with many missing values. The features used in here are,

  1. age: The patients age in years
  2. sex: The patients gender(1=male; 0=female)
  3. cp: Chest pain type, *Value 1: typical angina *Value 2: atypical angina *Value 3: non-anginal pain *Value 4: asymptomatic
  4. trestbps: Resting blood pressure (in mm Hg on admission to the hospital)
  5. chol: Serum cholestoral in mg/dl
  6. fbs: Fasting blood sugar > 120 mg/dl? (1=true; 0=false)
  7. restecg: Resting electrocardiographic results *Value 0: normal *Value 1: having ST-T wave abnormality (T wave inversions and/or ST elevation or depression of > 0.05 mV) *Value 2: showing probable or definite left ventricular hypertrophy by Estes' criteria
  8. thalach: Maximum heart rate achieved
  9. exang: Chest pain(angina) after exercise? (1=yes; 0=no)
  10. thal: Not described *Value 3=normal *Value 6=treated defect *Value 7=reversible defect
  11. num: Target *Value 0: less than 50% narrowing of coronary arteries(no heart disease) *Value 1,2,3,4: >50% narrowing. The value indicates the stage of heart disease

Dataset creators,

  1. Hungarian Institute of Cardiology. Budapest: Andras Janosi, M.D.
  2. University Hospital, Zurich, Switzerland: William Steinbrunn, M.D.
  3. University Hospital, Basel, Switzerland: Matthias Pfisterer, M.D.
  4. V.A. Medical Center, Long Beach and Cleveland Clinic Foundation: Robert Detrano, M.D., Ph.D.

Running the web app

Locally

  • Install requirements
    pip install -r requirements.txt
  • Run flask web app
    python main_file.py

Models used and accuracy

A Random forest classifier achieves an average multi-class classification accuracy of 56-60%(183 test samples). It gets 75-80% average binary classification accuracy(heart disease or no heart disease).

heart-disease-diagnosis's People

Contributors

simplesaad avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.