Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
The Deep Learning with Keras Workshop

You're reading from  The Deep Learning with Keras Workshop

Product type Book
Published in Jul 2020
Publisher Packt
ISBN-13 9781800562967
Pages 496 pages
Edition 1st Edition
Languages
Authors (3):
Matthew Moocarme Matthew Moocarme
Profile icon Matthew Moocarme
Mahla Abdolahnejad Mahla Abdolahnejad
Profile icon Mahla Abdolahnejad
Ritesh Bhagwat Ritesh Bhagwat
Profile icon Ritesh Bhagwat
View More author details

Table of Contents (11) Chapters

Preface
1. Introduction to Machine Learning with Keras 2. Machine Learning versus Deep Learning 3. Deep Learning with Keras 4. Evaluating 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 Appendix

6. Model Evaluation

Activity 6.01: Computing the Accuracy and Null Accuracy of a Neural Network When We Change the Train/Test Split

In this activity, we will see that our null accuracy and accuracy will be affected by changing the train/test split. To implement this, the part of the code where the train/test split was defined has to be changed. We will use the same dataset that we used in Exercise 6.02, Computing Accuracy and Null Accuracy with APS Failure for Scania Trucks Data. Follow these steps to complete this activity:

  1. Import the required libraries. Load the dataset using the pandas read_csv function and look at the first five rows of the dataset:
    # Import the libraries
    import numpy as np
    import pandas as pd
    # Load the Data
    X = pd.read_csv("../data/aps_failure_training_feats.csv")
    y = pd.read_csv("../data/aps_failure_training_target.csv")
    # Use the head function to get a glimpse data
    X.head()

    The following table shows the output of the preceding code...

lock icon The rest of the chapter is locked
arrow left Previous Chapter
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}