Coder Social home page Coder Social logo

yangzilong1986 / heart-disease-machine-learning Goto Github PK

View Code? Open in Web Editor NEW

This project forked from spiroganas/heart-disease-machine-learning

0.0 1.0 0.0 39 KB

sklearn machine learning models applied to the UCI Heart Disease data set.

License: MIT License

Python 100.00%

heart-disease-machine-learning's Introduction

Heart-Disease-Machine-Learning

sklearn machine learning models applied to the UCI Heart Disease data set.

The heart disease data set is from: https://archive.ics.uci.edu/ml/datasets/heart+Disease

load_heart_disease_data.py is a script that downloads four csv files from the UCI website into the local working directory. It merges the data into a single pandas dataframe, adds column headers, and (optionally) saves the data to a single csv file.

preprocess_heart_disease_data.py pre-processes the data by:

  • Replacing missing continous variables with the media for that variable.
  • Rescaling continous variables so they have a mean of 0 and a standard deviation of 1.
  • One-hot encoding discrete variables (ignoring any missing values).
  • Converting the heart disease column to a boolean value (True if the patient has heart disease, False otherwise).
  • Splitting the data into training and testing data sets.

analyze_heasrt_disease_data.py applies some machine learning algorithms from sklearn to the preprocessed data. Randomized Search Cross Validation is used to identify the best neural network architecture and hyperparameters. The best "optimized" neural network model produced an F1 score of 0.857. This compares to an F1 score of 0.79 for a neural network containing a single hidden layer with 10 nodes.

heart-disease-machine-learning's People

Contributors

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