Giter Site home page Giter Site logo

sleepapneadetection's Introduction

Sleep Apnea Detection

In this project we will detect Sleep Apnea Detection using machine learning. We have two files main.py, splitdata.py, dataVisualization.py. splitdata.py file is python 3.7 file used to split raw sleep apnea ecg data into python array and store it in ApneaData.pkl. Main.py is main file where machine learning algorithms are implemented. dataVisualization.py graphically plots the data by using dimensionality reduction techniques.

Datasets

Sleep Apnea dataset consists of around 16000 people ECG data sampled at 6000 sample points each and 1 or 0 representing whether person have sleep Apnea or not. Data set structure looks like

[
[0,1,2,.....,6000,cls],
[0,1,2,.....,6000,cls],
[0,1,2,.....,6000,cls],
...
...
...
..
[0,1,2,.....,6000,cls]
]

cls maybe 0 or 1. 1 respresents Apnea and 0 represents non Apnea.

You can download dataset files from
Goolge drive link

note: After downloading the datasets please copy them to the same folder where main.py and splitdata.py resides. ApneaData.pkl is generated from ApneaData.csv when you run splitdata.py .If you already downloaded both files no need to run splitdata.py file again. Directly run main.py.

Dependencies

main.py needs scipy and numpy packages which you have to install through python package installer pip. open command prompt as admin and run

pip install scipy 
pip install numpy 

note: Please install python 3.7 and don't forget to check add path while installing before installing packages.

Algorithms

The algorithm we are using is ensemble.RandomForestClassifier from sklearn which is faster and more accurate. This algoritm is picked and tested with few other comparison. Feel free to change other algorithm classifier(clf) from sklearn.

Using T-distributed Stochastic Neighbor Embedding algorithm to visualize data.

sleepapneadetection's People

Contributors

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