Book Image

Deep Learning with R Cookbook

By : Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar
Book Image

Deep Learning with R Cookbook

By: Swarna Gupta, Rehan Ali Ansari, Dipayan Sarkar

Overview of this book

Deep learning (DL) has evolved in recent years with developments such as generative adversarial networks (GANs), variational autoencoders (VAEs), and deep reinforcement learning. This book will get you up and running with R 3.5.x to help you implement DL techniques. The book starts with the various DL techniques that you can implement in your apps. A unique set of recipes will help you solve binomial and multinomial classification problems, and perform regression and hyperparameter optimization. To help you gain hands-on experience of concepts, the book features recipes for implementing convolutional neural networks (CNNs), recurrent neural networks (RNNs), and Long short-term memory (LSTMs) networks, as well as sequence-to-sequence models and reinforcement learning. You’ll then learn about high-performance computation using GPUs, along with learning about parallel computation capabilities in R. Later, you’ll explore libraries, such as MXNet, that are designed for GPU computing and state-of-the-art DL. Finally, you’ll discover how to solve different problems in NLP, object detection, and action identification, before understanding how to use pre-trained models in DL apps. By the end of this book, you’ll have comprehensive knowledge of DL and DL packages, and be able to develop effective solutions for different DL problems.
Table of Contents (11 chapters)

What this book covers

Chapter 1, Understanding Neural Networks and Deep Neural Networks, will show us how to set up a deep learning environment to train models. The readers are then introduced to neural networks, starting from how neural networks work, what hidden layers are, what backpropagation is, and what activation functions are. This chapter uses the keras library to demonstrate the recipes.

Chapter 2, Working with Convolutional Neural Networks, will show us CNNs and will explain how they can be used to train models for image recognition and natural language processing based tasks. This chapter also covers various hyperparameters and optimizers used with CNNs.

Chapter 3, Recurrent Neural Networks in Actionwill show us the fundamentals of RNNs with real-life implementation examples. We will also introduce LSTMs and gated recurrent units (GRUs), an extension of RNNs, and take a detailed walk-through of LSTM hyper-parameters. In addition to this, readers will learn how to build a bi-directional RNN model using Keras.

Chapter 4, Implementing Autoencoders with Keras, will introduce the implementation of various types of autoencoders using the keras library as the backend. Readers will also learn about various applications of autoencoders, such as dimensionality reduction and image coloring.

Chapter 5, Deep Generative Models, will show us the architecture of another method of deep neural networks, generative adversarial networks (GANs). We will demonstrate how to train a GAN model comprising of two pitting nets—a generator and a discriminator. This chapter also covers the practical implementation of variational autoencoders and compares them with GANs.

Chapter 6, Handling Big Data Using Large-Scale Deep Learning, contains case studies on high-performance computation involving large datasets utilizing GPUs. Readers will also be introduced to the parallel computation capabilities in R and libraries such as MXNet, which is designed for efficient GPU computing and state-of-the-art deep learning.

Chapter 7, Working with Text and Audio for NLP, contains case studies on various topics involving sequence data, including natural language processing (NLP) and speech recognition. The readers will implement end-to-end deep learning algorithms using various deep learning libraries.

Chapter 8, Deep Learning for Computer Vision, will provide end-to-end case studies on object detection and face identification.

Chapter 9, Implementing Reinforcement Learning, will walk us through the concepts of reinforcement learning step by step. Readers will learn about various methods, such as Markov Decision Processes, Q-Learning, and experience replay, and implement these methods in R using examples. Readers will also implement an end-to-end reinforcement learning example using R packages such as MDPtoolbox and Reinforcementlearning.