The Deep Learning with Keras Workshop: Learn how to define and train neural network models with just a few lines of code
Book information
Description
Discover how to leverage Keras, the powerful and easy-to-use open source Python library for developing and evaluating deep learning models Key Features Get to grips with various model evaluation metrics, including sensitivity, specificity, and AUC scores Explore advanced concepts such as sequential memory and sequential modeling Reinforce your skills with real-world development, screencasts, and knowledge checksBook Description New experiences can be intimidating, but not this one! This beginner's guide to deep learning is here to help you explore deep learning from scratch with Keras, and be on your way to training your first ever neural networks. What sets Keras apart from other deep learning frameworks is its simplicity. With over two hundred thousand users, Keras has a stronger adoption in industry and the research community than any other deep learning framework. The Deep Learning with Keras Workshop starts by introducing you to the fundamental concepts of machine learning using the scikit-learn package. After learning how to perform the linear transformations that are necessary for building neural networks, you'll build your first neural network with the Keras library. As you advance, you'll learn how to build multi-layer neural networks and recognize when your model is underfitting or overfitting to the training data. With the help of practical exercises, you'll learn to use cross-validation techniques to evaluate your models and then choose the optimal hyperparameters to fine-tune their performance. Finally, you'll explore recurrent neural networks and learn how to train them to predict values in sequential data. By the end of this book, you'll have developed the skills you need to confidently train your own neural network models. What you will learn Gain insights into the fundamentals of neural networks Understand the limitations of machine learning and how it differs from deep learning Build image classifiers with convolutional neural networks Evaluate, tweak, and improve your models with techniques such as cross-validation Create prediction models to detect data patterns and make predictions Improve model accuracy with L1, L2, and dropout regularizationWho this book is for If you know the basics of data science and machine learning and want to get started with advanced machine learning technologies like artificial neural networks and deep learning, then this is the book for you. To grasp the concepts explained in this deep learning book more effectively, prior experience in Python programming and some familiarity with statistics and logistic regression are a must. Table of Contents Introduction to Machine Learning with Keras Machine Learning versus Deep Learning Deep Learning with Keras Evaluating your Model with Cross-Validation Using Keras Wrappers Improving Model Accuracy Model Evaluation Computer Vision with Convolutional Neural Networks Transfer Learning and Pre-Trained Models Sequential Modeling with Recurrent Neural Networks Cover FM Copyright Table of Contents Preface Chapter 1: Introduction to Machine Learning with Keras Introduction Data Representation Tables of Data Loading Data Exercise 1.01: Loading a Dataset from the UCI Machine Learning Repository Data Preprocessing Exercise 1.02: Cleaning the Data Appropriate Representation of the Data Exercise 1.03: Appropriate Representation of the Data Life Cycle of Model Creation Machine Learning Libraries scikit-learn Keras Advantages of Keras Disadvantages of Keras More than Building Models Model Training Classifiers and Regression Models Classification Tasks Regression Tasks Training Datasets and Test Datasets Model Evaluation Metrics Exercise 1.04: Creating a Simple Model Model Tuning Baseline Models Exercise 1.05: Determining a Baseline Model Regularization Cross-Validation Activity 1.01: Adding Regularization to the Model Summary Chapter 2: Machine Learning versus Deep earning Introduction Advantages of ANNs over Traditional Machine Learning Algorithms Advantages of Traditional Machine Learning Algorithms over ANNs Hierarchical Data Representation Linear Transformations Scalars, Vectors, Matrices, and Tensors Tensor Addition Exercise 2.01: Performing Various Operations with Vectors, Matrices, and Tensors Reshaping Matrix Transposition Exercise 2.02: Matrix Reshaping and Transposition Matrix Multiplication Exercise 2.03: Matrix Multiplication Exercise 2.04: Tensor Multiplication Introduction to Keras Layer Types Activation Functions Model Fitting Activity 2.01: Creating a Logistic Regression Model Using Keras Summary Chapter 3: Deep Learning with Keras Introduction Building Your First Neural Network Logistic Regression to a Deep Neural Network Activation Functions Forward Propagation for Making Predictions Loss Function Backpropagation for Computing Derivatives of Loss Function Gradient Descent for Learning Parameters Exercise 3.01: Neural Network Implementation with Keras Activity 3.01: Building a Single-Layer Neural Network for Performing Binary Classification Model Evaluation Evaluating a Trained Model with Keras Splitting Data into Training and Test Sets Underfitting and Overfitting Early Stopping Activity 3.02: Advanced Fibrosis Diagnosis with Neural Networks Summary Chapter 4: Evaluating Your Model with Cross-Validation Using Keras Wrappers Introduction Cross-Validation Drawbacks of Splitting a Dataset Only Once K-Fold Cross-Validation Leave-One-Out Cross-Validation Comparing the K-Fold and LOO Methods Cross-Validation for Deep Learning Models Keras Wrapper with scikit-learn Exercise 4.01: Building the Keras Wrapper with scikit-learn for a Regression Problem Cross-Validation with scikit-learn Cross-Validation Iterators in scikit-learn Exercise 4.02: Evaluating Deep Neural Networks with Cross-Validation Activity 4.01: Model Evaluation Using Cross-Validation for an Advanced Fibrosis Diagnosis Classifier Model Selection with Cross-Validation Cross-Validation for Model Evaluation versus Model Selection Exercise 4.03: Writing User-Defined Functions to Implement Deep Learning Models with Cross-Validation Activity 4.02: Model Selection Using Cross-Validation for the Advanced Fibrosis Diagnosis Classifier Activity 4.03: Model Selection Using Cross-validation on a Traffic Volume Dataset Summary Chapter 5: Improving Model Accuracy Introduction Regularization The Need for Regularization Reducing Overfitting with Regularization L1 and L2 Regularization L1 and L2 Regularization Formulation L1 and L2 Regularization Implementation in Keras Activity 5.01: Weight Regularization on an Avila Pattern Classifier Dropout Regularization Principles of Dropout Regularization Reducing Overfitting with Dropout Exercise 5.01: Dropout Implementation in Keras Activity 5.02: Dropout Regularization on the Traffic Volume Dataset Other Regularization Methods Early Stopping Exercise 5.02: Implementing Early Stopping in Keras Data Augmentation Adding Noise Hyperparameter Tuning with scikit-learn Grid Search with scikit-learn Randomized Search with scikit-learn Activity 5.03: Hyperparameter Tuning on the Avila Pattern Classifier Summary Chapter 6: Model Evaluation Introduction Accuracy Exercise 6.01: Calculating Null Accuracy on a Pacific Hurricanes Dataset Advantages and Limitations of Accuracy Imbalanced Datasets Working with Imbalanced Datasets Confusion Matrix Metrics Computed from a Confusion Matrix Exercise 6.02: Computing Accuracy and Null Accuracy with APS Failure for Scania Trucks Data Activity 6.01: Computing the Accuracy and Null Accuracy of a Neural Network When We Change the Train/Test Split Exercise 6.03: Deriving and Computing Metrics Based on a Confusion Matrix Activity 6.02: Calculating the ROC Curve and AUC Score Summary Chapter 7: Computer Vision with Convolutional Neural Networks Introduction Computer Vision Convolutional Neural Networks The Architecture of a CNN Input Image Convolution Layer The Pooling Layer Flattening Image Augmentation Advantages of Image Augmentation Exercise 7.01: Building a CNN and Identifying Images of Cars and Flowers Activity 7.01: Amending Our Model with Multiple Layers and the Use of softmax Exercise 7.02: Amending Our Model by Reverting to the Sigmoid Activation Function Exercise 7.03: Changing the Optimizer from Adam to SGD Exercise 7.04: Classifying a New Image Activity 7.02: Classifying a New Image Summary Chapter 8: Transfer Learning andPre-Trained Models Introduction Pre-Trained Sets and Transfer Learning Feature Extraction Fine-Tuning a Pre-Trained Network The ImageNet Dataset Some Pre-Trained Networks in Keras Exercise 8.01: Identifying an Image Using the VGG16 Network Activity 8.01: Using the VGG16 Network to Train a Deep Learning Network to Identify Images Exercise 8.02: Classifying Images That Are Not Present in the ImageNet Database Exercise 8.03: Fine-Tuning the VGG16 Model Exercise 8.04: Image Classification with ResNet Activity 8.02: Image Classification with ResNet Summary Chapter 9: Sequential Modeling with Recurrent Neural Networks Introduction Sequential Memory and Sequential Modeling Recurrent Neural Networks (RNNs) The Vanishing Gradient Problem A Brief Explanation of the Exploding Gradient Problem Long Short-Term Memory (LSTM) Exercise 9.01: Predicting the Trend of Alphabet's Stock Price Using an LSTM with 50 Units (Neurons) Activity 9.01: Predicting the Trend of Amazon's Stock Price Using an LSTM with 50 Units (Neurons) Exercise 9.02: Predicting the Trend of Alphabet's Stock Price Using an LSTM with 100 units Activity 9.02: Predicting Amazon's Stock Price with Added Regularization Activity 9.03: Predicting the Trend of Amazon's Stock Price Using an LSTM with an Increasing Number of LSTM Neurons (100 Units) Summary Appendix Index
Similar books
The Deep Learning with Keras Workshop: Learn how to define and train neural network models with just a few lines of code. Code
2020 · ZIP
The Deep Learning with Keras Workshop: Learn how to define and train neural network models with just a few lines of code
2020 · EPUB
The Deep Learning with Keras Workshop: An Interactive Approach to Understanding Deep Learning with Keras, 2nd Edition
2020 · EPUB
The Deep Learning with Keras Workshop: An Interactive Approach to Understanding Deep Learning with Keras, 2nd Edition
2020 · PDF
The TensorFlow Workshop: A hands-on guide to building deep learning models from scratch using real-world datasets
2021 · PDF
The TensorFlow Workshop: A hands-on guide to building deep learning models from scratch using real-world datasets
2021 · EPUB
MySQL® Notes for Professionals book
2018 · PDF
MrExcel 2022: Boosting Excel
2022 · PDF