Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Machine Learning for Healthcare Analytics Projects

You're reading from  Machine Learning for Healthcare Analytics Projects

Product type Book
Published in Oct 2018
Publisher Packt
ISBN-13 9781789536591
Pages 134 pages
Edition 1st Edition
Languages

Building the network

We are now done with the data preprocessing that is necessary to prepare the data for machine learning. Now, it's time to start the fun part, where we actually get to build a neural network. We will train it using our training data, and then test it on our testing dataset:

  1. Let's go ahead and import the layers and models that we need to build the model. The following lines of code show all the imported layers:
from keras.models import Sequential
from keras.layers import Dense
from keras.optimizers import Adam

In the preceding code snippet, Adam is the standard optimizer that people use with deep neural networks and Keras.

  1. The next step is defining a function to build the Keras model, which can be done via the create_model() function. This function also gives us a way to replicate the model with slightly different parameters by defining inputs.
  2. Now...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}