Giter Club home page Giter Club logo

heart-attack-analysis-and-prediction's Introduction

Heart-attack-analysis-and-prediction

Introduction

I have trained a model which will predict whether a person is prone to heart attack based on his physical condition. I Scaled the training data and classified it. Fed the test Data into the system and predict the accuracy of test data W.R.T our trained data on the basis of proneness to heart attack. By using different type of scalers , I have also compared that which scaler gives maximum accuracy.

About the Dataset

  • Age : Age of the patient

  • Sex : Sex of the patient

  • cp : Chest Pain type chest pain type Value 1: typical angina Value 2: atypical angina Value 3: non-anginal pain Value 4: asymptomatic

  • trtbps : resting blood pressure (in mm Hg)

  • chol : cholestoral in mg/dl fetched via BMI sensor

  • fbs : (fasting blood sugar > 120 mg/dl) (1 = true; 0 = false)

  • rest_ecg : 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

  • exang: exercise induced angina (1 = yes; 0 = no)

  • thalach : maximum heart rate achieved

  • target : 0= less chance of heart attack 1= more chance of heart attack

Data set

image

Training the data

Using train test split package to split the data into training and testing models for further processing

Scaling and it's purpose

Python Data Scaling โ€“ Standardization Data standardization is the process where using which we bring all the data under the same scale. This will help us to analyze and feed the data to the models. This is the math behind the process of data standardization.

Scalers compared are

image

Results

  • We see that the optimal number of clusters that gives the highest accuracy is 7 which means that dividing the data into 7 clusters after scaling down the data by using MinMax algorithm an accuracy of 90.1 can be achieved in the following data set

  • By using the standard scaling algorithm , the optimal number of clusters is found to be 8 and an accuracy of 88.52 is achieved

heart-attack-analysis-and-prediction's People

Contributors

jassiek avatar

Watchers

 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.