Git Product home page Git Product logo

pima-diabetes-neural-network-tensorflow-keras's Introduction

100DaysofML-Day5

Neural Network with TensorFlow & Keras

This project demonstrates how to build a simple feedforward neural network using TensorFlow and Keras for the Pima Indians Diabetes dataset.

Overview

The Pima Indians Diabetes dataset is a collection of medical records of Pima Indians and whether they had an onset of diabetes within five years. It's a widely-used dataset in the field of machine learning for binary classification problems. The dataset contains 768 instances and 9 attributes, including the target variable (whether the patient has diabetes or not).

Getting Started

To run this project, you need to have the following prerequisites installed on your machine:

  • Python 3.x
  • TensorFlow
  • Keras

You can install TensorFlow and Keras using pip:

pip install tensorflow
pip install keras

How to Run

  • Clone this repository.

  • Navigate to the project directory.

  • Run the script with the following command:

    python simple_neural_network_keras.py
    

Project Structure

  • simple_neural_network_keras.py: The main Python script that trains and evaluates the neural network model.

Model

The neural network model is built using the Keras Sequential API. It consists of one hidden layer with 12 neurons and an output layer with one neuron for binary classification. The model uses the 'relu' activation function for the hidden layer and the 'sigmoid' activation function for the output layer. The model is compiled with the 'binary_crossentropy' loss function and the 'adam' optimizer.

Evaluation

The model is evaluated using the k-fold cross-validation technique with 10 folds. The accuracy metric is used to assess the model's performance.

Acknowledgments

This project was inspired by Jason Brownlee, PhD at Machine Learning Mastery.

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.