Artificial Neural Network : Training

Similar documents
Introduction to Neural Networks

4. Multilayer Perceptrons

An artificial neural networks (ANNs) model is a functional abstraction of the

Pattern Classification

(Feed-Forward) Neural Networks Dr. Hajira Jabeen, Prof. Jens Lehmann

Unit III. A Survey of Neural Network Model

LECTURE # - NEURAL COMPUTATION, Feb 04, Linear Regression. x 1 θ 1 output... θ M x M. Assumes a functional form

y(x n, w) t n 2. (1)

ARTIFICIAL NEURAL NETWORK PART I HANIEH BORHANAZAD

Multilayer Perceptrons and Backpropagation

Pattern Recognition Prof. P. S. Sastry Department of Electronics and Communication Engineering Indian Institute of Science, Bangalore

Machine Learning. Neural Networks. (slides from Domingos, Pardo, others)

ADALINE for Pattern Classification

Introduction to Natural Computation. Lecture 9. Multilayer Perceptrons and Backpropagation. Peter Lewis

Neural Networks and the Back-propagation Algorithm

CSC242: Intro to AI. Lecture 21

Neural Networks and Fuzzy Logic Rajendra Dept.of CSE ASCET

Simple Neural Nets For Pattern Classification

Artificial Neural Networks Examination, March 2004

ECE521 Lectures 9 Fully Connected Neural Networks

Artificial Intelligence

Neural Networks. Fundamentals Framework for distributed processing Network topologies Training of ANN s Notation Perceptron Back Propagation

Fundamentals of Neural Networks

Artificial Neural Networks (ANN)

Multilayer Perceptron

18.6 Regression and Classification with Linear Models

COMP 551 Applied Machine Learning Lecture 14: Neural Networks

Gradient Descent Training Rule: The Details

Artifical Neural Networks

Neural networks. Chapter 19, Sections 1 5 1

Machine Learning for Large-Scale Data Analysis and Decision Making A. Neural Networks Week #6

Machine Learning. Neural Networks. (slides from Domingos, Pardo, others)

Data Mining Part 5. Prediction

Machine Learning. Neural Networks. (slides from Domingos, Pardo, others)

Neural networks. Chapter 20. Chapter 20 1

Instituto Tecnológico y de Estudios Superiores de Occidente Departamento de Electrónica, Sistemas e Informática. Introductory Notes on Neural Networks

Artificial Neural Networks Examination, June 2005

CS 4700: Foundations of Artificial Intelligence

Lecture 4: Perceptrons and Multilayer Perceptrons

Lecture 7 Artificial neural networks: Supervised learning

Radial-Basis Function Networks

Lecture 16: Introduction to Neural Networks

Part 8: Neural Networks

Radial-Basis Function Networks

Machine Learning. Neural Networks

Artificial Neural Networks. Edward Gatt

CE213 Artificial Intelligence Lecture 14

Neural Networks. Nethra Sambamoorthi, Ph.D. Jan CRMportals Inc., Nethra Sambamoorthi, Ph.D. Phone:

Introduction to Artificial Neural Networks

Deep Feedforward Networks

NN V: The generalized delta learning rule

CS 6501: Deep Learning for Computer Graphics. Basics of Neural Networks. Connelly Barnes

Lecture 13 Back-propagation

Artificial Neural Networks

COGS Q250 Fall Homework 7: Learning in Neural Networks Due: 9:00am, Friday 2nd November.

Artificial Neural Networks. Historical description

Bidirectional Representation and Backpropagation Learning

Neural Networks biological neuron artificial neuron 1

Neural Networks. Chapter 18, Section 7. TB Artificial Intelligence. Slides from AIMA 1/ 21

Lab 5: 16 th April Exercises on Neural Networks

1. A discrete-time recurrent network is described by the following equation: y(n + 1) = A y(n) + B x(n)

Feedforward Neural Nets and Backpropagation

Reading Group on Deep Learning Session 1

AI Programming CS F-20 Neural Networks

Course 395: Machine Learning - Lectures

EEE 241: Linear Systems

Neural Networks. Advanced data-mining. Yongdai Kim. Department of Statistics, Seoul National University, South Korea

Lecture 10. Neural networks and optimization. Machine Learning and Data Mining November Nando de Freitas UBC. Nonlinear Supervised Learning

Revision: Neural Network

Neural Networks, Computation Graphs. CMSC 470 Marine Carpuat

CS 4700: Foundations of Artificial Intelligence

Administration. Registration Hw3 is out. Lecture Captioning (Extra-Credit) Scribing lectures. Questions. Due on Thursday 10/6

Multilayer Neural Networks

Neural Networks Introduction

2015 Todd Neller. A.I.M.A. text figures 1995 Prentice Hall. Used by permission. Neural Networks. Todd W. Neller

Classification goals: Make 1 guess about the label (Top-1 error) Make 5 guesses about the label (Top-5 error) No Bounding Box

Multilayer Perceptron = FeedForward Neural Network

Artificial Neural Networks The Introduction

Artificial Neural Network and Fuzzy Logic

CSE 190 Fall 2015 Midterm DO NOT TURN THIS PAGE UNTIL YOU ARE TOLD TO START!!!!

ARTIFICIAL INTELLIGENCE. Artificial Neural Networks

Neural networks. Chapter 20, Section 5 1

Artificial Neural Networks" and Nonparametric Methods" CMPSCI 383 Nov 17, 2011!

Serious limitations of (single-layer) perceptrons: Cannot learn non-linearly separable tasks. Cannot approximate (learn) non-linear functions

Artificial Neural Networks Examination, June 2004

Neural Networks: Basics. Darrell Whitley Colorado State University

ARTIFICIAL NEURAL NETWORKS گروه مطالعاتي 17 بهار 92

Artificial Neural Networks. MGS Lecture 2

DM534 - Introduction to Computer Science

SPSS, University of Texas at Arlington. Topics in Machine Learning-EE 5359 Neural Networks

Backpropagation: The Good, the Bad and the Ugly

<Special Topics in VLSI> Learning for Deep Neural Networks (Back-propagation)

Lecture 6. Notes on Linear Algebra. Perceptron

RegML 2018 Class 8 Deep learning

Neural Networks Learning the network: Backprop , Fall 2018 Lecture 4

Ch.8 Neural Networks

Neural Networks and Ensemble Methods for Classification

PMR5406 Redes Neurais e Lógica Fuzzy Aula 3 Single Layer Percetron

Artificial Neural Networks (ANN) Xiaogang Su, Ph.D. Department of Mathematical Science University of Texas at El Paso

Multilayer Neural Networks. (sometimes called Multilayer Perceptrons or MLPs)

Transcription:

Artificial Neural Networ : Training Debasis Samanta IIT Kharagpur debasis.samanta.iitgp@gmail.com 06.04.2018 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 1 / 49

Learning of neural networs: Topics Concept of learning Learning in Single layer feed forward neural networ multilayer feed forward neural networ recurrent neural networ Types of learning in neural networs Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 2 / 49

Concept of Learning Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 3 / 49

The concept of learning The learning is an important feature of human computational ability. Learning may be viewed as the change in behavior acquired due to practice or experience, and it lasts for relatively long time. As it occurs, the effective coupling between the neuron is modified. In case of artificial neural networs, it is a process of modifying neural networ by updating its weights, biases and other parameters, if any. During the learning, the parameters of the networs are optimized and as a result process of curve fitting. It is then said that the networ has passed through a learning phase. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 4 / 49

Types of learning There are several learning techniques. A taxonomy of well nown learning techniques are shown in the following. Learning Supervised Unsupervised Reinforced Error Correction gradient descent Stochastic Hebbian Competitive Least mean square Bac propagation In the following, we discuss in brief about these learning techniques. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 5 / 49

Different learning techniques: Supervised learning Supervised learning In this learning, every input pattern that is used to train the networ is associated with an output pattern. This is called training set of data. Thus, in this form of learning, the input-output relationship of the training scenarios are available. Here, the output of a networ is compared with the corresponding target value and the error is determined. It is then feed bac to the networ for updating the same. This results in an improvement. This type of training is called learning with the help of teacher. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 6 / 49

Different learning techniques: Unsupervised learning Unsupervised learning If the target output is not available, then the error in prediction can not be determined and in such a situation, the system learns of its own by discovering and adapting to structural features in the input patterns. This type of training is called learning without a teacher. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 7 / 49

Different learning techniques: Reinforced learning Reinforced learning In this techniques, although a teacher is available, it does not tell the expected answer, but only tells if the computed output is correct or incorrect. A reward is given for a correct answer computed and a penalty for a wrong answer. This information helps the networ in its learning process. Note : Supervised and unsupervised learnings are the most popular forms of learning. Unsupervised learning is very common in biological systems. It is also important for artificial neural networs : training data are not always available for the intended application of the neural networ. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 8 / 49

Different learning techniques : Gradient descent learning Gradient Descent learning : This learning technique is based on the minimization of error E defined in terms of weights and the activation function of the networ. Also, it is required that the activation function employed by the networ is differentiable, as the weight update is dependent on the gradient of the error E. Thus, if W ij denoted the weight update of the lin connecting the i-th and j-th neuron of the two neighboring layers then W ij = η E W ij where η is the learning rate parameter and E W ij is the error gradient with reference to the weight W ij The least mean square and bac propagation are two variations of this learning technique. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 9 / 49

Different learning techniques : Stochastic learning Stochastic learning In this method, weights are adjusted in a probabilistic fashion. Simulated annealing is an example of such learning (proposed by Boltzmann and Cauch) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 10 / 49

Different learning techniques: Hebbian learning Hebbian learning This learning is based on correlative weight adjustment. This is, in fact, the learning technique inspired by biology. Here, the input-output pattern pairs (x i, y i ) are associated with the weight matrix W. W is also nown as the correlation matrix. This matrix is computed as follows. W = n i=1 X iyi T where Yi T is the transpose of the associated vector y i Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 11 / 49

Different learning techniques : Competitive learning Competitive learning In this learning method, those neurons which responds strongly to input stimuli have their weights updated. When an input pattern is presented, all neurons in the layer compete and the winning neuron undergoes weight adjustment. This is why it is called a Winner-taes-all strategy. In this course, we discuss a generalized approach of supervised learning to train different type of neural networ architectures. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 12 / 49

Training SLFFNNs Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 13 / 49

Single layer feed forward NN training We now that, several neurons are arranged in one layer with inputs and weights connect to every neuron. Learning in such a networ occurs by adjusting the weights associated with the inputs so that the networ can classify the input patterns. A single neuron in such a neural networ is called perceptron. The algorithm to train a perceptron is stated below. Let there is a perceptron with (n + 1) inputs x 0, x 1, x 2,, x n where x 0 = 1 is the bias input. Let f denotes the transfer function of the neuron. Suppose, X and Ȳ denotes the input-output vectors as a training data set. W denotes the weight matrix. With this input-output relationship pattern and configuration of a perceptron, the algorithm Training Perceptron to train the perceptron is stated in the following slide. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 14 / 49

Single layer feed forward NN training 1 Initialize W = w 0, w 1,, w n to some random weights. 2 For each input pattern x X do Here, x = {x 0, x 1,...x n } Compute I = n i=0 w ix i Compute observed output y Ȳ = Ȳ + y y = f (I) = { 1, if I > 0 0, if I 0 Add y to Ȳ, which is initially empty 3 If the desired output Ȳ matches the observed output Ȳ then output W and exit. 4 Otherwise, update the weight matrix W as follows : For each output y Ȳ do If the observed out y is 1 instead of 0, then w i = w i αx i, (i = 0, 1, 2, n) Else, if the observed out y is 0 instead of 1, then w i = w i + αx i, (i = 0, 1, 2, n) 5 Go to step 2. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 15 / 49

Single layer feed forward NN training In the above algorithm, α is the learning parameter and is a constant decided by some empirical studies. Note : The algorithm Training Perceptron is based on the supervised learning technique ADALINE : Adaptive Linear Networ Element is also an alternative term to perceptron If there are 10 number of neutrons in the single layer feed forward neural networ to be trained, then we have to iterate the algorithm for each perceptron in the networ. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 16 / 49

Training MLFFNNs Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 17 / 49

Training multilayer feed forward neural networ Lie single layer feed forward neural networ, supervisory training methodology is followed to train a multilayer feed forward neural networ. Before going to understand the training of such a neural networ, we redefine some terms involved in it. A bloc digram and its configuration for a three layer multilayer FF NN of type l m n is shown in the next slide. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 18 / 49

Specifying a MLFFNN I O I [V] I H O H 21 [W] I o 31 O v11 1 I 1 1 I i 1 I l 11............ 1i 1l vi1 v1i vl1 vij v1m vlj vlm............ 2j wj1 wj wjn....... 3....... vlm 2m 3n O I I H O H I o I N1 N2 N3 [V] [W] Input layer Hidden Layer Output Layer N1 =l N2 =m N3 =n O Linear transfer function, ɵ f ( I, ) l i i i f Log-Sigmoid transfer function m H 1 j ( I j, j ) ji 1 e H j Tan-Sigmoid transfer function oio I n o e e f ( I, ) oio I e e o o o o Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 19 / 49

Specifying a MLFFNN For simplicity, we assume that all neurons in a particular layer follow same transfer function and different layers follows their respective transfer functions as shown in the configuration. Let us consider a specific neuron in each layer say i-th, j-th and -th neurons in the input, hidden and output layer, respectively. Also, let us denote the weight between i-th neuron (i = 1, 2,, l) in input layer to j-th neuron (j = 1, 2,, m) in the hidden layer is denoted by v ij. The weight matrix between the input to hidden layer say V is denoted as follows. v 11 v 12 v 1j v 1m v 21 v 22 v 2j v 2m V =...... v i1 v i2 v ij v im v l1 v l2 v lj v lm Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 20 / 49

Specifying a MLFFNN Similarly, w j represents the connecting weights between j th neuron(j = 1, 2,, m) in the hidden layer and -th neuron ( = 1, 2, n) in the output layer as follows. w 11 w 12 w 1 w 1n w 21 w 22 w 2 w 2n W =...... w j1 w j2 w j w jn w m1 w m2 w m w mn Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 21 / 49

Learning a MLFFNN Whole learning method consists of the following three computations: 1 Input layer computation 2 Hidden layer computation 3 Output layer computation In our computation, we assume that < T 0, T I > be the training set of size T. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 22 / 49

Input layer computation Let us consider an input training data at any instant be I I = [I 1 1, I1 2,, I1 i, I 1 l ] where I I T I Consider the outputs of the neurons lying on input layer are the same with the corresponding inputs to neurons in hidden layer. That is, O I = I I [l 1] = [l 1] [Output of the input layer] The input of the j-th neuron in the hidden layer can be calculated as follows. Ij H = v 1j o1 I + v 2jo2 I +,, +v ijoj I + + v lj ol I where j = 1, 2, m. [Calculation of input of each node in the hidden layer] In the matrix representation form, we can write I H = V T O I [m 1] = [m l] [l 1] Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 23 / 49

Hidden layer computation Let us consider any j-th neuron in the hidden layer. Since the output of the input layer s neurons are the input to the j-th neuron and the j-th neuron follows the log-sigmoid transfer function, we have O H j = 1 1+e α H IH j where j = 1, 2,, m and α H is the constant co-efficient of the transfer function. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 24 / 49

Hidden layer computation Note that all output of the nodes in the hidden layer can be expressed as a one-dimensional column matrix.. O H 1 = 1+e α H IH j. m 1 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 25 / 49

Output layer computation Let us calculate the input to any -th node in the output layer. Since, output of all nodes in the hidden layer go to the -th layer with weights w 1, w 2,, w m, we have I O = w 1 o H 1 + w 2 o H 2 + + w m o H m where = 1, 2,, n In the matrix representation, we have I O = W T O H [n 1] = [n m] [m 1] Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 26 / 49

Output layer computation Now, we estimate the output of the -th neuron in the output layer. We consider the tan-sigmoid transfer function. for = 1, 2,, n O = eα o I o e α o I o e α o I o +e α o I o Hence, the output of output layer s neurons can be represented as. e O = α o I o e α o I o e α o I o +e α o I o. n 1 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 27 / 49

Bac Propagation Algorithm The above discussion comprises how to calculate values of different parameters in l m n multiple layer feed forward neural networ. Next, we will discuss how to train such a neural networ. We consider the most popular algorithm called Bac-Propagation algorithm, which is a supervised learning. The principle of the Bac-Propagation algorithm is based on the error-correction with Steepest-descent method. We first discuss the method of steepest descent followed by its use in the training algorithm. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 28 / 49

Method of Steepest Descent Supervised learning is, in fact, error-based learning. In other words, with reference to an external (teacher) signal (i.e. target output) it calculates error by comparing the target output and computed output. Based on the error signal, the neural networ should modify its configuration, which includes synaptic connections, that is, the weight matrices. It should try to reach to a state, which yields minimum error. In other words, its searches for a suitable values of parameters minimizing error, given a training set. Note that, this problem turns out to be an optimization problem. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 29 / 49

Method of Steepest Descent E Error, E V Initial weights V, W W Best weight Adjusted weight (a) Searching for a minimum error (b) Error surface with two parameters V and W Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 30 / 49

Method of Steepest Descent For simplicity, let us consider the connecting weights are the only design parameter. Suppose, V and W are the wights parameters to hidden and output layers, respectively. Thus, given a training set of size N, the error surface, E can be represented as E = N i=1 ei (V, W, I i ) where I i is the i-th input pattern in the training set and e i (...) denotes the error computation of the i-th input. Now, we will discuss the steepest descent method of computing error, given a changes in V and W matrices. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 31 / 49

Method of Steepest Descent Suppose, A and B are two points on the error surface (see figure in Slide 30). The vector AB can be written as AB = (V i+1 V i ) x + (W i+1 W i ) ȳ = V x + W ȳ The gradient of AB can be obtained as e AB = E V x + E W ȳ Hence, the unit vector in the direction of gradient is [ ē AB = 1 E e AB V x + E W ȳ ] Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 32 / 49

Method of Steepest Descent With this, we can alternatively represent the distance vector AB as where η = AB = η [ E V e AB and is a constant So, comparing both, we have x + E W ȳ ] V = η E V W = η E W This is also called as delta rule and η is called learning rate. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 33 / 49

Calculation of error in a neural networ Let us consider any -th neuron at the output layer. For an input pattern I i T I (input in training) the target output T O of the -th neuron be T O. Then, the error e of the -th neuron is defined corresponding to the input I i as e = 1 2 (T O O O )2 where O O denotes the observed output of the -th neuron. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 34 / 49

Calculation of error in a neural networ For a training session with I i T I, the error in prediction considering all output neurons can be given as e = n =1 e = 1 n 2 =1 (T O O O )2 where n denotes the number of neurons at the output layer. The total error in prediction for all output neurons can be determined considering all training session < T I, T O > as E = I i T I e = 1 2 n t <T I,T O > =1 (T O O O )2 Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 35 / 49

Supervised learning : Bac-propagation algorithm The bac-propagation algorithm can be followed to train a neural networ to set its topology, connecting weights, bias values and many other parameters. In this present discussion, we will only consider updating weights. Thus, we can write the error E corresponding to a particular training scenario T as a function of the variable V and W. That is E = f (V, W, T ) In BP algorithm, this error E is to be minimized using the gradient descent method. We now that according to the gradient descent method, the changes in weight value can be given as and V = η E V (1) W = η E W Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 36 / 49 (2)

Supervised learning : Bac-propagation algorithm Note that ve sign is used to signify the fact that if E V > 0, then we have to decrease V and vice-versa. (or E W ) Let v ij (and w j ) denotes the weights connecting i-th neuron (at the input layer) to j-th neuron(at the hidden layer) and connecting j-th neuron (at the hidden layer) to -th neuron (at the output layer). Also, let e denotes the error at the -th neuron with observed output as O O o and target output T O o as per a sample intput I T I. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 37 / 49

Supervised learning : Bac-propagation algorithm It follows logically therefore, e = 1 2 (T O o O O o )2 and the weight components should be updated according to equation (1) and (2) as follows, where w j = η e w j and w j = w j + w j (3) v ij = v ij + v ij (4) where v ij = η e v ij Here, v ij and w ij denotes the previous weights and v ij and w ij denote the updated weights. Now we will learn the calculation w ij and v ij, which is as follows. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 38 / 49

Calculation of w j We can calculate e w j below. using the chain rule of differentiation as stated Now, we have e w j = e O O o O Oo I o I o w j (5) e = 1 2 (T O o O O o )2 (6) O O o = eθoio e θoio e θoio + e θoio (7) I o = w 1 O H 1 + w 2 O H 2 + + w j O H j + w m O H m (8) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 39 / 49

Calculation of w j Thus, e O O o = (T O o O O o ) (9) and O o o I o = θ o (1 + O O o )(1 O O o ) (10) I o w ij = O H j (11) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 40 / 49

Calculation of w j Substituting the value of we have e O O o, O Oo I o and Io w j e w j = (T O o O O o ) θ o (1 + O O o )(1 O O o ) O H j (12) Again, substituting the value of E w j from Eq. (12) in Eq.(3), we have w j = η θ o (T O o O O o ) (1 + O O o )(1 O O o ) O H j (13) Therefore, the updated value of w j can be obtained using Eq. (3) w j = w j + w j = η θ o (T O o O O o ) (1+O O o )(1 O O o ) O H j +w j (14) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 41 / 49

Calculation of v ij Lie, e w j, we can calculate e V ij as follows, using the chain rule of differentiation e v ij = e O O o O Oo I o I o O H j OH j I H j IH j v ij (15) Now, e = 1 2 (T O o O O o )2 (16) O o = eθoio e θoio e θoio + e θoio (17) I o = w 1 O1 H + w 2 O2 H + + w j Oj H + w m Om H (18) Oj H 1 = (19) 1 + e θ HIj H Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 42 / 49

Calculation of v ij...continuation from previous page... Thus I H j = v ij O H 1 + v 2j O H 2 + + v ij O I j + v ij O I l (20) e O O o = (T O o O O o ) (21) O o I o = θ o (1 + O O o )(1 O O o ) (22) I o O H j = w i (23) O H j I H j = θ H (1 O H j ) O H j (24) I H j v i j = O I i = I I i (25) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 43 / 49

Calculation of v ij From the above equations, we get e v ij Substituting the value of e v ij = θ o θ H (T O o O O o ) (1 OO 2 o ) Oj H Ii H w j (26) using Eq. (4), we have v ij = η θ o θ H (T O o O O o ) (1 O 2 O o ) O H j I H i w j (27) Therefore, the updated value of v ij can be obtained using Eq.(4) v ij = v ij + η θ o θ H (T O o O O o ) (1 O 2 O o ) O H j I H i w j (28) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 44 / 49

Writing in matrix form for the calculation of V and W we have w j = η θ o (T O o O O o ) (1 OO 2 o ) Oj H (29) is the update for -th neuron receiving signal from j-th neuron at hidden layer. v ij = η θ o θ H (T O o O O o ) (1 O 2 O o ) (1 O H j ) O H j I I i w j (30) is the update for j-th neuron at the hidden layer for the i-th input at the i-th neuron at input level. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 45 / 49

Calculation of W Hence, [ [ W ] m n = η O H] [N] 1 n (31) m 1 where [N] 1 n = { } θ o (T O o O O o ) (1 OO 2 o ) (32) where = 1, 2, n Thus, the updated weight matrix for a sample input can be written as [ W ] m n = [W ] m n + [ W ] m n (33) Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 46 / 49

Calculation of V Similarly, for [ V ] matrix, we can write v ij = η θ o (T O o O O o ) (1 OO 2 o ) w j θ H (1 Oj H ) Oj H I I i (34) Thus, or = η w j θ H (1 O H j ) O H j (35) V = [I I] l 1 [ M T ] 1 m [ V ]l m = [V ] l m + [I I] l 1 [ M T ] 1 m (36) (37) This calculation of Eq. (32) and (36) for one training data t < T O, T I >. We can apply it in incremental mode (i.e. one sample after another) and after each training data, we update the networs V and W matrix. Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 47 / 49

Batch mode of training A batch mode of training is generally implemented through the minimization of mean square error (MSE) in error calculation. The MSE for -th neuron at output level is given by Ē = 1 2 1 ( ) T 2 T t=1 T t O o Ot O o where T denotes the total number of training scenariso and t denotes a training scenario, i.e. t < T O, T I > In this case, w j and v ij can be calculated as follows and w j = 1 T t T Ē W v ij = 1 T t T Ē V Once w j and v ij are calculated, we will be able to obtain w j and v ij Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 48 / 49

Any questions?? Debasis Samanta (IIT Kharagpur) Soft Computing Applications 06.04.2018 49 / 49