GithubHelp home page GithubHelp logo

habibmrad / cardiac-arrhythmia-ml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akshaybhatia10/cardiac-arrhythmia-ml

0.0 1.0 0.0 334.42 MB

This repository contains the project files for the Capstone Project - Cardiac Arrhythmia ML as part of Udacity's Machine Learning Nanodegree.

Python 0.28% Jupyter Notebook 99.72%

cardiac-arrhythmia-ml's Introduction

Cardiac Arrythmia ML

Machine Learning Engineer Nanodegree

Install

This project requires Python 3 and the following Python libraries installed:

You will also need to have software installed to run and execute a Jupyter Notebook

You could just install Anaconda distribution of Python, which already has the above packages and more included.

Run

In a terminal or command window, navigate to the top-level project directory (that contains this README) and run one of the following commands:

ipython notebook CardiacML\ Final.ipynb

or

jupyter notebook CardiacML\ Final.ipynb

This will open the Jupyter Notebook software and project file in your browser.

Data

The heartbeat recording can be downloaded from here. The dataset contains about 3500 recording but we will only use about 1000 due to memory and computation constraints. After converting the .wav recordings into spectrogram images, the training dataset has 800 images (of which 400 belong to abnormal and 600 to normal class) and test set contains around 225 images(80 of abnormal and rest belong to normal class).

About

The focus of this project is to classify whether the patient has “normal” or “abnormal” heart sound from the Phonocardiogram (PCG) or heartbeat recordings to quickly identify patients who would require further diagnosis. This is a supervised learning problem since we already know if the heart sound in training dataset is normal or abnormal. The basic idea is to convert each heart sound recording(wav file) to a spectrogram image and train a Convolutional Neural Network over those images. Then given a new PCG recording, we will be able to classify it as normal or abnormal.

The model (Convolutional Neural Network) takes images as input. So we first need to convert the recordings into spectrogram images. This is taken care by 'convert_to_spectrogram.py' which is present in the same repostiory as this notebook. Hence before experimenting with this notebook, it is required to run 'convert_to_spectrogram.py'. It will automatically put the images in the following folder structure as shown below. (Note : It is manually required to create empty folders according to structure). The techniques inolved to convert recordings into spectrogram images are discussed in the capstone report.

The dataset used for this capstone is available freely as part of the PhysioNet / Computing in Cardiology Challenge 2016 which focuses on automatic classification of normal / abnormal phonocardiogram (PCG) recording. Along with clean heart sounds, the dataset also contains some noisy recordings. The samples have been obtained from both normal subjects and pathological patients, providing a variety of signal sources

cardiac-arrhythmia-ml's People

Contributors

akshaybhatia10 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.