
Perceptron Learning for Artificial Intelligence
Learn about the derivation and application of a learning rule for perceptrons to minimize squared errors, including the gradient descent algorithm and the intuition behind perceptron learning. Discover how perceptron learning works through weight space and its convergence properties.
Download Presentation

Please find below an Image/Link to download the presentation.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.
You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.
The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.
E N D
Presentation Transcript
CS 4700: Foundations of Artificial Intelligence Carla P. Gomes / Bart Selman gomes@cs.cornell.edu Module: Perceptron Learning R&N 18.7 Carla P. Gomes CS4700
Derivation of a learning rule for Perceptrons Minimizing Squared Errors Threshold perceptrons have some advantages , in particular Simple learning algorithm that fits a threshold perceptron to any linearly separable training set. Key idea: Learn by adjusting weights to reduce error on training set. update weights repeatedly (epochs) for each example. We ll use: Sum of squared errors (e.g., used in linear regression), classical error measure Learning is an optimization search problem in weight space. Carla P. Gomes CS4700
Derivation of a learning rule for Perceptrons Minimizing Squared Errors Let S = {(xi, yi): i = 1, 2, ..., m} be a training set. (Note, x is a vector of inputs, and y is the vector of the true outputs.) Let hwbe the perceptron classifier represented by the weight vector w. Definition: 1 = = = = 2 x x x ( ) ( ) ( ( )) E Squared Error y h w 2 Carla P. Gomes CS4700
Derivation of a learning rule for Perceptrons Minimizing Squared Errors The squared error for a single training example with input x and true output y is: Where hw (x) is the output of the perceptron on the example and y is the true output value. We can use the gradient descent to reduce the squared error by calculating the partial derivatives of E with respect to each weight. Note: g (in) derivative of the activation function. For sigmoid g =g(1-g). For threshold perceptrons, where g (n) is undefined, the original perceptron rule simply omitted it. Carla P. Gomes CS4700
Gradient descent algorithm we want to reduce , E, for each weight wi, change weight in direction of steepest descent: learning rate Wj Wj + Ij Err Intuitively: Err = y hW(x) positive output is too small weights are increased for positive inputs and decreased for negative inputs. Err = y hW(x) negative opposite Carla P. Gomes CS4700
Perceptron Learning: Intuition Rule is intuitively correct! Greedy Search: Surprising proof of convergence: Gradient descent through weight space! Weight space has no local minima! With enough examples, it will find the target function! (provide not too large) Carla P. Gomes CS4700
Gradient descent in weight space From T. M. Mitchell, Machine Learning Carla P. Gomes CS4700
Wj Wj + Ij Err Perceptron learning rule: 1. Start with random weights, w = (w1, w2, ... , wn). Select a training example (x,y) S. 2. Epoch cycle through the examples Run the perceptron with input x and weights w to obtain g 3. Let be the training rate (a user-set parameter). 4. + , , w w w w i i i i where = ( in ( )) ( ' ) w y g g in x i i 5. Go to 2. Epochs are repeated until some stopping criterion is reached typically, that the weight changes have become very small. The stochastic gradient method selects examples randomly from the training set rather than cycling through them.
Perceptron Learning: Gradient Descent Learning Algorithm Carla P. Gomes CS4700