220 likes | 463 Views
Bab 5 Classification: Alternative Techniques Part 4 Artificial Neural Networks Based Classifer. Artificial Neural Networks (ANN) / 1. Output Y is 1 if at least two of the three inputs are equal to 1. Artificial Neural Networks (ANN) / 2. Artificial Neural Networks (ANN) / 3.
E N D
Bab 5Classification: Alternative TechniquesPart 4Artificial Neural Networks Based Classifer
Artificial Neural Networks (ANN) / 1 Output Y is 1 if at least two of the three inputs are equal to 1.
Artificial Neural Networks (ANN) / 3 • Model is an assembly of inter-connected nodes and weighted links • Output node sums up each of its input value according to the weights of its links • Compare output node against some threshold t Perceptron Model or
General Structure of ANN Training ANN means learning the weights of the neurons
Algorithm for Learning ANN • Initialize the weights (w0, w1, …, wk) • Adjust the weights in such a way that the output of ANN is consistent with class labels of training examples • Objective function: • Find the weights wi’s that minimize the above objective function • e.g., backpropagation algorithm
Perceptron Learning Rule / 1 • Let D = {(xi, yi) | i= 1,2,…,N} be the set of training examples • Initialize the weights • Repeat • For each training example (xi, yi) do • Compute f(w, xi) • For each weight wj do Update the weight • Until stopping condition is met
Perceptron Learning Rule / 2 • Weight update formula: • Intuition: • Update weight based on error • If y = f(w,x), e = 0, no update is needed • If y > f(w,x), e = 2, weight must be increased so that f(w,x) will increase • If y < f(w,x), e = -2, weight must be decreased so that f(w,x) will decrease
Perceptron Learning Rule / 3 • Terminating condition: Training stops when either • all wij in the previous epoch (i.e., iteration) were so small as to be below some specified threshold, or • the percentage of samples misclassified in the previous epoch is below some threshold, or • a pre-specified number of epochs has expired. In practice, several hundreds of thousands of epochs may be required before the weights will converge