Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Neural Networks with R

You're reading from   Neural Networks with R Build smart systems by implementing popular deep learning models in R

Arrow left icon
Product type Paperback
Published in Sep 2017
Publisher Packt
ISBN-13 9781788397872
Length 270 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Balaji Venkateswaran Balaji Venkateswaran
Author Profile Icon Balaji Venkateswaran
Balaji Venkateswaran
Giuseppe Ciaburro Giuseppe Ciaburro
Author Profile Icon Giuseppe Ciaburro
Giuseppe Ciaburro
Arrow right icon
View More author details
Toc

Table of Contents (8) Chapters Close

Preface 1. Neural Network and Artificial Intelligence Concepts FREE CHAPTER 2. Learning Process in Neural Networks 3. Deep Learning Using Multilayer Neural Networks 4. Perceptron Neural Network Modeling – Basic Models 5. Training and Visualizing a Neural Network in R 6. Recurrent and Convolutional Neural Networks 7. Use Cases of Neural Networks – Advanced Topics

Step-by-step illustration of a neuralnet and an activation function

We shall take a step-by-step approach to understand the forward and reverse pass with a single hidden layer. The input layer has one neuron and the output will solve a binary classification problem (predict 0 or 1). In the following figure is shown a forward and reverse pass with a single hidden layer:

Next, let us analyze in detail, step by step, all the operations to be done for network training:

  1. Take the input as a matrix.
  2. Initialize the weights and biases with random values. This is one time and we will keep updating these with the error propagation process.
  3. Repeat the steps 4 to 9 for each training pattern (presented in random order), until the error is minimized.
  4. Apply the inputs to the network.
  5. Calculate the output for every neuron from the input layer, through the hidden layer(s), to the output layer.
  6. Calculate the error at the outputs: actual minus predicted.

 

  1. Use the output error to compute error signals for previous layers. The partial derivative of the activation function is used to compute the error signals.
  2. Use the error signals to compute weight adjustments.
  3. Apply the weight adjustments.

Steps 4 and 5 are forward propagation and steps 6 through 9 are backpropagation.

The learning rate is the amount that weights are updated is controlled by a configuration parameter.

The complete pass back and forth is called a training cycle or epoch. The updated weights and biases are used in the next cycle. We keep recursively training until the error is very minimal.

We shall cover more about the forward and backpropagation in detail throughout this book.

You have been reading a chapter from
Neural Networks with R
Published in: Sep 2017
Publisher: Packt
ISBN-13: 9781788397872
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 €18.99/month. Cancel anytime