Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Applied Deep Learning with Keras

You're reading from   Applied Deep Learning with Keras Solve complex real-life problems with the simplicity of Keras

Arrow left icon
Product type Paperback
Published in Apr 2019
Publisher
ISBN-13 9781838555078
Length 412 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Ritesh Bhagwat Ritesh Bhagwat
Author Profile Icon Ritesh Bhagwat
Ritesh Bhagwat
Mahla Abdolahnejad Mahla Abdolahnejad
Author Profile Icon Mahla Abdolahnejad
Mahla Abdolahnejad
Matthew Moocarme Matthew Moocarme
Author Profile Icon Matthew Moocarme
Matthew Moocarme
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

About the Book
About the Authors
Learning Objectives
Audience
Approach
Hardware Requirements
Software Requirements
Conventions
Installation and Setup
Installing the Code Bundle
Additional Resources
1. Introduction to Machine Learning with Keras FREE CHAPTER 2. Machine Learning versus Deep Learning 3. Deep Learning with Keras 4. Evaluate Your Model with Cross-Validation using Keras Wrappers 5. Improving Model Accuracy 6. Model Evaluation 7. Computer Vision with Convolutional Neural Networks 8. Transfer Learning and Pre-Trained Models 9. Sequential Modeling with Recurrent Neural Networks 1. Appendix

Chapter 1: Introduction to Machine Learning with Keras

Activity 1: Adding Regularization to the Model

Solution:

  1. Load the feature data from Exercise 1 and the target data from the second activity. The feature data from the second activity can also be used:

    import pandas as pd

    feats = pd.read_csv(‘data/bank_data_feats_e3.csv’, index_col=0)

    target = pd.read_csv(‘data/bank_data_target_e2.csv’, index_col=0)

  2. We will again create a test and train dataset. We will train the data using the training dataset. This time, however, we will use part of the training dataset for validation in order to choose the most appropriate hyperparameter.

    We will again use test_size = 0.2, which means that 20% of the data will be reserved for testing. The size of our validation set will be determined by how many validation folds we have. If we do 10-fold cross-validation, this equates to reserving 10% of the training dataset to validate our model on. Each fold will use a different 10...

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 £13.99/month. Cancel anytime
Visually different images