Download presentation

Presentation is loading. Please wait.

Published byHarriet Lang Modified over 6 years ago

1
Learning Department of Computer Science & Engineering Indian Institute of Technology Kharagpur

2
CSE, IIT Kharagpur2 Paradigms of learning Supervised Learning –A situation in which both inputs and outputs are given –Often the outputs are provided by a friendly teacher. Reinforcement Learning –The agent receives some evaluation of its action (such as a fine for stealing bananas), but is not told the correct action (such as how to buy bananas). Unsupervised Learning –The agent can learn relationships among its percepts, and the trend with time

3
CSE, IIT Kharagpur3 Decision Trees A decision tree takes as input an object or situation described by a set of properties, and outputs a yes/no “decision”. Decision: Whether to wait for a table at a restaurant. 1.Alternate: whether there is a suitable alternative restaurant 2.Lounge: whether the restaurant has a lounge for waiting customers 3.Fri/Sat: true on Fridays and Saturdays 4.Hungry: whether we are hungry 5.Patrons: how many people are in it (None, Some, Full) 6.Price: the restaurant’ price range ( ★, ★★, ★★★ ) 7.Raining: whether it is raining outside 8.Reservation: whether we made a reservation 9.Type: the kind of restaurant (Indian, Chinese, Thai, Fastfood) 10.WaitEstimate: 0-10 mins, 10-30, 30-60, >60.

4
CSE, IIT Kharagpur4 Sample Decision Tree Patrons? Yes WaitEstimate?NoYes Reservation?Fri/Sat? Lounge?NoYes NoYes Alternate?NoHungry? Alternate?Yes Raining?Yes NoYes NoneSomeFull >60 30-6010-30 1-10 NoYes No

5
CSE, IIT Kharagpur5 Decision Tree Learning Algorithm Function Decision-Tree-Learning( examples, attributes, default ) if examples is empty then return default else if all examples have the same classification then return the classification else if attributes is empty then return Majority-Value( examples ) else best Choose-Attribute( attributes, examples ) tree a new decision tree with root test best for each value v i of best do examples i { elements of examples with best = v i } subtree Decision-Tree-Learning( examples i, attributes – best, Majority-Value( examples )) add a branch to tree with label v i and subtree subtree end return tree

6
CSE, IIT Kharagpur6 Neural Networks A neural network consists of a set of nodes (neurons/units) connected by links –Each link has a numeric weight associated with it Each unit has: –a set of input links from other units, –a set of output links to other units, –a current activation level, and –an activation function to compute the activation level in the next time step.

7
CSE, IIT Kharagpur7 Basic definitions The total weighted input is the sum of the input activations times their respective weights: In each step, we compute: in i aiai g Input Function Activation Function Output a i = g( in i ) Input Links ajaj W j,i Output Links

8
CSE, IIT Kharagpur8 Learning in Single Layer Networks IjIj W j,i OiOi If the output for a output unit is O, and the correct output should be T, then the error is given by: Err = T – O The weight adjustment rule is: W j W j + x I j x Err where is a constant called the learning rate This method is unable to learn all types of functions can learn only linearly separable functions Used in competitive learning

9
CSE, IIT Kharagpur9 Two-layer Feed-Forward Network O i Output units W j,i a j Hidden units W k,j I k Input units

10
CSE, IIT Kharagpur10 Back-Propagation Learning Err i = (T i – O i ) is the error at the output node The weight update rule for the link from unit j to output unit i is: W j,i W j,i + x a j x Err i x g'(in i ) where g' is the derivative of the activation function g. Let i = Err i g'(in i ). Then we have: W j,i W j,i + x a j x i

11
CSE, IIT Kharagpur11 Error Back-Propagation For updating the connections between the inputs and the hidden units, we need to define a quantity analogous to the error term for the output nodes –Hidden node j is responsible for some fraction of the error i each of the output nodes to which it connects –So, the i values are divided according to the strength of the connection between the hidden node and the output node, and propagated back to provide the j values for the hidden layer The weight update rule for weights between the inputs and the hidden layer is: W k,j W k,j + x I k x j

12
CSE, IIT Kharagpur12 The theory The total error is given by: Only one of the terms in the summation over i and j depends on a particular W j,i, so all other terms are treated as constants with respect to W j,i Similarly:

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google