Robotics 15

download Robotics 15

of 35

Transcript of Robotics 15

  • 8/6/2019 Robotics 15

    1/35

    1

    EXPERT SYSTEMS AND SOLUTIONS

    Email: [email protected]

    [email protected]

    Cell: 9952749533www.researchprojects.info

    PAIYANOOR, OMR, CHENNAI

    Call For Research Projects Final

    year students of B.E in EEE, ECE, EI,

    M.E (Power Systems), M.E (Applied

    Electronics), M.E (Power Electronics)

    Ph.D Electrical and Electronics.

    Students can assemble their hardware in our

    Research labs. Experts will be guiding theprojects.

  • 8/6/2019 Robotics 15

    2/35

    2

    Learning in Neural Networks

    Sibel KAPLAN

    ZMR-2004

  • 8/6/2019 Robotics 15

    3/35

    3

    Program...

    History

    Introduction

    Models of Processing Elements (neurons) Models of Synaptic Interconnections

    Learning Rules for Updating the Weights

    Supervised learning

    Perceptron Learning

    Adaline Learning

    Back Propagation (an example)

    Reinforcement Learning

    Unsupervised Learning

    Hebbian Learning Rule

  • 8/6/2019 Robotics 15

    4/35

    4

    1943: ANNs were first studied by McCollach and Pitts

    1949: Donal Hebb used ANN to store knowledge

    1958: Rosenblatt found perceptron and it was started to use for patternrecognition

    1960: Widrow-Marcian Hoff found ADALINE

    1982: J.J. Hopfield published his study about single-layer feedback

    neural network with symmetric weights1990s: It was applied to different kinds of problems, softwares werebegun to be used

    History...

  • 8/6/2019 Robotics 15

    5/35

    5

    The Real and Artificial Neurons

  • 8/6/2019 Robotics 15

    6/35

    6

    ANNs are systems that are constructed to make use of some

    organizational principles resembling those of the human brain

    ANNs are good at tasks such as; pattern matching and classification

    function approximation

    optimization

    vector quantitization

    data clustering

  • 8/6/2019 Robotics 15

    7/35

    7

    Input

    values

    weights

    SummingFunction (net input)

    Bias

    b

    ActivationfunctionLocal

    Field

    vOutput

    y

    x1

    x2

    xm

    w2

    wm

    w1

    / /

    )(N

    The Neuron (Processing Element)

  • 8/6/2019 Robotics 15

    8/35

    8

    Models of ANNs are specified by three basic entitites:

    Models of the neurons themselves,

    Models of synaptic interconnections and structures,

    Training or learning rules for updating the connecting

    weights

  • 8/6/2019 Robotics 15

    9/35

    9

    There are three important parameters about a neuron:

    I. An integrated function associated with the input of aneuron to calculate the net input (for M-P neuron):

    fi neti =

    II. A set of links, describing the neuron inputs, with

    weights W1, W2, , Wm

    !

    m

    j

    ijij Qtxw

    1

    )(

  • 8/6/2019 Robotics 15

    10/35

    10

    Activation functions [a(f)] output an activation value as a function of

    its net input. Some commonly used activation functions are;

    Step Function

    Hard limiter (thresold function)

    Ramp function

    Unipolar sigmoid function

    Bipolar sigmoid function

    III. Activation Function

  • 8/6/2019 Robotics 15

    11/35

    11

    Connections

    An ANN consists of a set of highly interconnected neurons

    such that each neuron output is connected throughweights to other neurons or to itself.

  • 8/6/2019 Robotics 15

    12/35

    12

    y1

    y2

    yn

    x1

    x2

    xm

    w11

    w21

    wnm

    w23

    Single-Layer Feedforward

    Network

    Single Node with

    Feedback to Itself

    x1

    x2

    xm

    y1

    y2

    yn

    Single Layer Recurrent

    Network

    Basic types of connection geometries (Nelson

    and Illingworth, 1991).

  • 8/6/2019 Robotics 15

    13/35

    13

    x2

    x1

    xm

    y1

    y2

    yn

    InputLayer

    Hidden Layers OutputLayer

    Multilayer Feedforward Network

    x1

    x2

    xm

    y1

    y2

    yn

    Multilayer Recurrent Network

    Basic types of connection geometries (Nelson and

    Illingworth, 1991).

  • 8/6/2019 Robotics 15

    14/35

    14

    L

    earning Rules

    Generally, we can classify learning in ANNs in two broad

    classes:

    Parameter learning which is concerned with updating ofthe connecting weights

    Structure learning which focuses on the change in the

    network structure, including the number of PEs and theirconnection types.

    These two kinds of learning can be performed

    simultaneously or separately.

  • 8/6/2019 Robotics 15

    15/35

    15

    In weight learning, we have to develop learning rules to

    efficiently guide the weight matrix W in approaching a

    desired matrix that yields the desired networkperformance. In general, learning rules are classified into

    three categories:

    Supervised Learning (learning with a teacher)

    Reinforcement Learning (learning with a critic)

    Unsupervised learning

  • 8/6/2019 Robotics 15

    16/35

    16

    In supervised learning;

    when input is applied to an ANN, the corresponding desired response of

    the system is given. An ANN is supplied with a sequence of examples (x1,d1) , ( x2, d2)...(xk, dk) of desired input-output pairs.

    In reinforcement learning;

    only less detailed information than supervised learning is available.There is only a single bit of feedback information indicating whether the

    output is right or wrong. That is, it just says how good or how bad a

    particular output is and provides no hint as to what the right answer

    should be.

  • 8/6/2019 Robotics 15

    17/35

    17

    In unsupervised learning;

    there is no teacher to provide any feedback information. Thenetwork must discover for itself patterns, features,regularities, correlations or categories in the input data andcode for them in the output. While discovering these

    features, the network undergoes changes in its parameters;this process is called self-organizing.

  • 8/6/2019 Robotics 15

    18/35

    18

    Three Categories of Learning

    Supervised Learning Reinforcement Learning

    Unsupervised Learning

  • 8/6/2019 Robotics 15

    19/35

    19

    Machine Learning

    Supervised Unsupervised

    Data:

    Labeled examples

    (input , desired output)Problems:classificationpattern recognitionregression

    NN models:perceptronadalineback-propagation

    Data:Unlabeled examples

    (different realizations of theinput)

    Problems:clusteringcontent addressable memory

    NN models:self-organizing maps (SOM)HammingnetworksHopfieldnetworkshierarchicalnetworks

  • 8/6/2019 Robotics 15

    20/35

    20

    Knowledge about the learning task is given in the form of

    examples called training examples.

    The aim of the training process is to obtain a NN that

    generalizes well, that is, that behaves correctly on new

    instances of the learning task.

  • 8/6/2019 Robotics 15

    21/35

    21

    A general form of the weight learning rule indicates that the

    incremet of the weight vector wi produced by the learning

    step at time t is proportional to the product of the learningsignal r and the input x(t);

    r = fr (wi, x , di ) (learning signal)Hence, the increse in the weight vector;

    )()( trxti L!(

    )()()()()()1( ),,( ttitt

    ir

    t

    i

    t

    i xdxwfww L!

  • 8/6/2019 Robotics 15

    22/35

    22

    Perceptron Learning Rule

    The perceptron is used for binary classification.

    Training is done by error back-propagation algorithm.

    For simple perceptrons with linear threshold units (LTUs),

    the desired outputs di(k) can take only 1 values. Then;

    It is necessary to find a hyperplane that divides inputs that

    have positive and negative targets (or outputs).

    )()()(

    )sgn(k

    i

    kT

    i

    k

    i dxwy !!

  • 8/6/2019 Robotics 15

    23/35

    23

    Linear Separability in Perceptron

    ?

    I1

    I2

    I1 I1

    I2 I2

    I1 and I2 I1 or I2I1 xor I2

    w1x1 + w2x2 + w0 = 00wxw0

    m

    1i

    ii !!

    decision

    boundary

    C1

    C2

  • 8/6/2019 Robotics 15

    24/35

    24

    The condition for solvability of a pattern classificationproblem by a simple perceptron depends on whether the

    problem is linearly separable or not. If a classification problem is linearly separable by a simpleperceptron then;

    (desired output = +1) (desired output = -1)

    0HxT

    i0R

    xw

    T

    i

  • 8/6/2019 Robotics 15

    25/35

    25

    Adaline (Widrow-Hoff) Learning Rule (1962)

    When the two classes are not linearly separable, it may be

    desirable to obtain a linear separator that minimizes the

    mean squared error.

    Adaline (Adaptive LinearElement);

    uses a linear neuron model

    uses the Least-Mean-Square (LMS) learning algorithm

    useful for robust linear classification and regression

  • 8/6/2019 Robotics 15

    26/35

    26

    To update the weights, we define a cost function E(w)

    which measures the systems performance error:

    For weight adjustment;

    !

    !p

    k

    kk ydwE1

    2)()( )(2

    1)(

    )(wEw w!( L

    !

    !x

    x!(

    p

    k

    k

    j

    kT

    k

    j

    j xxwdw

    Ew

    1

    )()( )(LL

  • 8/6/2019 Robotics 15

    27/35

    27

    Back-Propagation

    One of the most important historical development in ANNs.

    Applied to multilayer feedforward networks consisting of processing

    elements with continuous differentiable activation functions.Process:

    The input patterns is propagated from the input layer to the outputlayer and it produces an actual output

    The error signals resulting from the difference between dk and yk areback-propagated from the output layer to the previous layers for them toupdate their weights.

  • 8/6/2019 Robotics 15

    28/35

    28

    Three-Layer Back-Propagation Network

    yi

    zq

    Xj

    wiq

    vqj

    x1 xj xm

    J=1,2,...,m

    q=1,2,...,l

    i=1,2,...,n

    !

    !m

    j

    jqjq xvnet1

    )()(1!!!

    n

    j

    jqjqq xvanetaz

    ))(()()(1 11

    ! !!

    !!!l

    q

    m

    j

    jqjiq

    l

    q

    qiqii xvawazwanetay

    These indicate the forward propagation of input signals through the

    layers of neurons.

  • 8/6/2019 Robotics 15

    29/35

    29

    ? A

    ! !!!

    n

    i

    n

    i

    iiii netadyd1 1

    22 )(

    2

    1)(

    2

    1)(

    iq

    iqxx!( L

    ? A? A? A qoiqiiiiq zznetaydw LHL !!( )(,

    Then according to the gradient-descent method, the weights in thehidden to output connections are updated by;

    A cost function is defined as in Adaline Learning Rule;

  • 8/6/2019 Robotics 15

    30/35

    30

    According to the law;

    when an axonal input from Neuron A to neuron B causes

    neuron B to immediately emit a pulse (fire) and thissituation happens repeatedly or persistently, then the

    chance of that axonal input in terms of its ability to help

    neuron B to fire in the future is somehow increased. It is a

    rule used also for other learning rules.

    Hebbs Learning Law (1949)

  • 8/6/2019 Robotics 15

    31/35

    31

    According to Hebbian Hypothesis;

    r a (wiTx ) = yi

    a(.): activation function of neuron

    In this equation, the learning signal r is simply set as the

    neurons current output. Then the incremet in the weights:

    (i = 1, 2,.........n); (j = 1, 2,..............m)

    jijT

    iij xyxxwaw LL !!( )(

    $

  • 8/6/2019 Robotics 15

    32/35

    32

    It is suggested choosing the initial weights between

    (Wessels and Barnard, 1992)

    Learning constant ( ) is usually chosen experimentally for

    each problem. A larger value could speed up the

    convergence but might result in overshooting. Valuesranging from 10-3 to 10 have been used succesfully for many

    applications.

    ? Ak

    i

    kk /3,/3

    Tips about important learning factors

    L

  • 8/6/2019 Robotics 15

    33/35

    33

    I1

    I2

    w11

    w23

    w13

    G11

    G32

    Q1

    Q2

    W11 =0.2 ,W21 =0.1 (i=1,2)W12 =0.4, W22 =0. 2 (j=1,2,3)W13 =0.7, W23 =0.2 (k=1,2)

    Gw11 = 0.1,Gw21=0.3,Gw31 =0.4 (j=1,2,3)

    Gw12 = 0.2,Gw22 = 0.5,Gw32 = 0.3 ( k=1,2)

    L : 0,3

    :E 0,7I1=0.6, I2=0.7

    11

    11 Nete

    f

    ! sigmoidfunction

    An example about back-propagation...

  • 8/6/2019 Robotics 15

    34/35

    34

    (for j=1)

    = (B11=0)

    =0.6*0.2+0.7*0.1=0.19

    = 0.547

    !

    !2

    1i

    ijijiJ BINet

    !

    !2

    1

    1111

    i

    iiwINet 2121111 wIwINet !

    19.011

    1

    !e

    A

  • 8/6/2019 Robotics 15

    35/35

    35

    !

    !3

    1

    11

    j

    jjGwNet 313212111GwGwGw =

    = 0.547*0.1+0.593*0.3+0.636*0.4

    = 0.487

    = 0.619 (final output)487.01

    1

    1

    !

    eError of the first output: E1= (Q1 desired-Q1 real)

    = 0.5-0.619 = -0.119

    Total cost (error) =

    = 0.1555

    )(2

    1 22

    2

    1EE ? A22 )5449.0()119.0(

    2

    1=