Book Image

R Deep Learning Projects

Book Image

R Deep Learning Projects

Overview of this book

R is a popular programming language used by statisticians and mathematicians for statistical analysis, and is popularly used for deep learning. Deep Learning, as we all know, is one of the trending topics today, and is finding practical applications in a lot of domains. This book demonstrates end-to-end implementations of five real-world projects on popular topics in deep learning such as handwritten digit recognition, traffic light detection, fraud detection, text generation, and sentiment analysis. You'll learn how to train effective neural networks in R—including convolutional neural networks, recurrent neural networks, and LSTMs—and apply them in practical scenarios. The book also highlights how neural networks can be trained using GPU capabilities. You will use popular R libraries and packages—such as MXNetR, H2O, deepnet, and more—to implement the projects. By the end of this book, you will have a better understanding of deep learning concepts and techniques and how to use them in a practical setting.
Table of Contents (11 chapters)

Chapter 1. Handwritten Digit Recognition Using Convolutional Neural Networks

We kick off our R deep learning journey with the fundamental and core concepts of deep learning, and a deep learning 101 project—handwritten digit recognition. We will start with what deep learning is about, why we need it, and its evolution in recent years. We will also discuss why deep learning stands out and several typical deep learning applications. With the important deep learning concepts in mind, we get it started with our image classification project where we first conduct exploratory analysis on the data and make an initial attempt using shallow single-layer neural networks. Then we move on with deeper neural networks and achieve better results. However, we argue that chaining more hidden layers does not necessarily improve classification performance. The key is to extract richer representation and more informative features. And convolutional neural networks (CNNs) are the way to go! We will be demonstrating how we boost the digit recognition accuracy to nearly 99% with CNNs, which are well suited to exploiting strong and unique features that differentiate between images. We finally wrap up the chapter after several more experiments and validations.

We will look into these topics in detail:

  • What is deep learning and what is special about it
  • Applications of deep learning
  • Exploratory analysis on MNIST handwritten digit data
  • Handwritten digit recognition using logistic regression and single-layer neural networks with the nnet package
  • Handwritten digit recognition using deep neural networks with the MXNet package
  • Rectified linear unit
  • The mechanics and structure of convolutional neural networks
  • Handwritten digit recognition using convolutional neural networks with the MXNet package
  • Visualization of outputs of convolutional layers
  • Early stopping in deep neural networks