Simple Guide to Deep Learning and Parameter Tuning with R

Manish Saraswat
3 min readJan 31, 2017

Introduction

Deep Learning isn’t a recent discovery. The seeds were sown back in the 1950s when the first artificial neural network was created. Since then, progress has been rapid, with the structure of the neuron being “re-invented” artificially.

Computers and mobiles have now become powerful enough to identify objects from images.

Not just images, they can chat with you as well! Haven’t you tried Google’s Allo app ? That’s not all — they can drive, make supersonic calculations, and help businesses solve the most complicated problems (more users, revenue, etc).

But, what is driving all these inventions? It’s Deep Learning!

With increasing open source contributions, R language now provides a fantastic interface for building predictive models based on neural networks and deep learning. However, learning to build models isn’t enough. You ought to understand the interesting story behind them.

In this tutorial, I’ll start with the basics of neural networks and deep learning (from scratch). Along with theory, we’ll also learn to build deep learning models in R using MXNet and H2O package. Also, we’ll learn to tune parameters of a deep learning model for better model performance.

Note: This article is meant for beginners and expects no prior understanding of deep learning (or neural networks).

Table of Contents

  1. What is Deep Learning ? How is it different from a Neural Network?
  2. How does Deep Learning work ?
  • Why is bias added to the network ?
  • What are activation functions and their types ?
  1. Multi Layered Neural Networks
  • What is Backpropagation Algorithm ? How does it work ?
  • Gradient Descent
  1. Practical Deep Learning with H2O & MXnet

What is Deep Learning ? How is it different from a Neural Network?

Deep Learning is the new name for multilayered neural networks. You can say, deep learning is an enhanced and powerful form of a neural network. The difference between the two is subtle.

The difference lies in the fact that, deep learning models are build on several hidden layers (say, more than 2) as compared to a neural network (built on up to 2 layers).

Since data comes in many forms (tables, images, sound, web etc), it becomes extremely difficult for linear methods to learn and detect the non — linearity in the data. In fact, many a times even non-linear algorithms such as tree based (GBM, decision tree) fails to learn from data.

In such cases, a multi layered neural network which creates non — linear interactions among the features (i.e. goes deep into features) gives a better solution.

You might ask this question, ‘Neural networks emerged in 1950s. But, deep learning emerged just few years back. What happened all of a sudden in last few years?’

In the last few years, there has been tremendous advancement in computational devices (specially GPUs). High performance of deep learning models come with a cost i.e. computation. They require large memory for computation.

The world is continually progressing from CPU to GPU (Graphics Processing Unit). Why ? Because, a CPU can be enabled with max. 22 cores, but a GPU can contain thousands of cores, thereby making it exponentially powerful than a CPU.

Click Here: Complete Article — Deep Learning

--

--

Manish Saraswat

Self Learned Data Science Guy | Only Books | Highly Curious | Loves Writing | Codes in R |