Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
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

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

A comparison of categorical and binary problems

We will compare and contrast our categorical classification problem and the binary classification problem just covered. To do this, first we have to create a new model, since we've changed our data. We will define a binary model, then we will define an input layer, a hidden layer and an output layer, compile the model, and finally print the model:

As we see in the screenshot, our third layer has only one output value, so it's going to be 0 and 1, instead of a one-hot encoded vector for a categorical classification. So, our binary model is ready, and now we're in the training phase—let's fit the binary model to our binary data that we curated:

As we can see in the preceding screenshot, we're getting better accuracy than we were on our categorical classification problem. Binary classification is like...

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}