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
Keras 2.x Projects

You're reading from  Keras 2.x Projects

Product type Book
Published in Dec 2018
Publisher Packt
ISBN-13 9781789536645
Pages 394 pages
Edition 1st Edition
Languages
Author (1):
Giuseppe Ciaburro Giuseppe Ciaburro
Profile icon Giuseppe Ciaburro
Toc

Table of Contents (13) Chapters close

Preface 1. Getting Started with Keras 2. Modeling Real Estate Using Regression Analysis 3. Heart Disease Classification with Neural Networks 4. Concrete Quality Prediction Using Deep Neural Networks 5. Fashion Article Recognition Using Convolutional Neural Networks 6. Movie Reviews Sentiment Analysis Using Recurrent Neural Networks 7. Stock Volatility Forecasting Using Long Short-Term Memory 8. Reconstruction of Handwritten Digit Images Using Autoencoders 9. Robot Control System Using Deep Reinforcement Learning 10. Reuters Newswire Topics Classifier in Keras 11. What is Next? 12. Other Books You May Enjoy

Building a Keras deep neural network model

After exploring the dataset, it's time to build our deep neural network model, so as to predict the quality of concrete from the characteristics of its ingredients. We prepare the data before proceeding. We split the starting data into two sets: the training set and test set. The training set is used to train a classification model and the test set to test model performance.

To split the data, scikit-learn library has been used. More specifically, the sklearn.model_selection.train_test_split() function has been used. This function quickly computes a random split into training and test sets. Let's start by importing the function:

from sklearn.model_selection import train_test_split

Let's start by splitting the DataFrame into predictors and response:

Predictors = pd.DataFrame(DataScaled.iloc[:,:8])
Response = pd.DataFrame...
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