Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Machine Learning for Healthcare Analytics Projects

You're reading from   Machine Learning for Healthcare Analytics Projects Build smart AI applications using neural network methodologies across the healthcare vertical market

Arrow left icon
Product type Paperback
Published in Oct 2018
Publisher Packt
ISBN-13 9781789536591
Length 134 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Eduonix Learning Solutions Eduonix Learning Solutions
Author Profile Icon Eduonix Learning Solutions
Eduonix Learning Solutions
Arrow right icon
View More author details
Toc

Optimizing the number of neurons

Let's now move on to tuning the number of neurons in each of these layers. Since we are following the same steps as the preceding sections, we will go through all these steps and do a recap with the code snippet at the end. So, let's get started with the following steps:

  1. We will start by copying the code from the cell used in the Finding the optimal hyperparameters section, and paste it in a new cell. In this new cell, we will play around with the number of neurons by modifying some of the variables.
  2. We will convert the total number of neurons present in each hidden layer into variables, such as neuron1 and neuron2. We will also define these variables in the create_model() function, so that they are called every time we execute it.
  3. We will also change the kernel_initializer and activation values to tanh and normal, since those were the...
You have been reading a chapter from
Machine Learning for Healthcare Analytics Projects
Published in: Oct 2018
Publisher: Packt
ISBN-13: 9781789536591
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 €18.99/month. Cancel anytime