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

Performing a grid search using scikit-learn

It's now time to prepare our grid search algorithm. We will follow a step-by-step process to make it easier to understand and execute:

  1. The first thing that we will do is copy the create_model() function, which we created in the Building a Keras model section, and paste it into a new cell, as shown in the following screenshot:
  1. Now, we will define a random seed through NumPy. This helps us to create results that are reproducible. We are also going to add random initialization of weights and random divisions of data into different groups. We will set a starting point so that we have the same initialization and the same divisions for all the data. This can be done by adding a few lines of code above the create_model() function, as shown in the following screenshot:
  1. Our next step is to initialize the KerasClassifier that we imported...
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}