Unformatted text preview:

Learning from ObservationsLearningLearning elementInductive learningInductive learning methodSlide 6Slide 7Slide 8Slide 9Slide 10ExpressivenessHypothesis spacesSlide 13EntropyEntropy of a binary variableDivide and ConquerDecision tree learningLearning decision treesAttribute-based representationsDecision treesSlide 21Choosing an attributeUsing information theoryInformation gainComputing Entropy and IGSlide 26Example contd.Performance measurementWhy Learning WorksTraining ExamplesSelecting the Next AttributePartially learned treeOver fitting in Decision TreesSlide 34Avoiding over-fitting the dataReduced error pruningRule post-pruningRule Extraction from TreesSlide 39Handling training examples with missing attribute valuesHandling attributes with differing costsSummaryBasic ProceduresLearning agentsLearning from ObservationsChapter 18Section 1 – 3Learning•Learning is essential for unknown environments,–i.e., when designer lacks omniscience•Learning is useful as a system construction method,–i.e., expose the agent to reality rather than trying to write it down•Learning modifies the agent's decision mechanisms to improve performanceLearning element•Design of a learning element is affected by–Which components of the performance element are to be learned–What feedback is available to learn these components–What representation is used for the components•Type of feedback:–Supervised learning: correct answers for each example–Unsupervised learning: correct answers not given–Reinforcement learning: occasional rewardsInductive learning•Simplest form: learn a function from examplesf is the target functionAn example is a pair (x, f(x))Problem: find a hypothesis hsuch that h ≈ fgiven a training set of examples(This is a highly simplified model of real learning:–Ignores prior knowledge–Assumes a deterministic, observable ``environment'' –Assumes examples are given)Inductive learning method•Construct/adjust h to agree with f on training set•(h is consistent if it agrees with f on all examples)•E.g., curve fitting:Inductive learning method•Construct/adjust h to agree with f on training set•(h is consistent if it agrees with f on all examples)•E.g., curve fitting:Inductive learning method•Construct/adjust h to agree with f on training set•(h is consistent if it agrees with f on all examples)•E.g., curve fitting:Inductive learning method•Construct/adjust h to agree with f on training set•(h is consistent if it agrees with f on all examples)•E.g., curve fitting:Inductive learning method•Construct/adjust h to agree with f on training set•(h is consistent if it agrees with f on all examples)•E.g., curve fitting:Inductive learning method•Construct/adjust h to agree with f on training set•(h is consistent if it agrees with f on all examples)•E.g., curve fitting:•Ockham’s razor: prefer the simplest hypothesis consistent with dataExpressiveness•Decision trees can express any function of the input attributes.•E.g., for Boolean functions, truth table row → path to leaf:•Trivially, there is a consistent decision tree for any training set with one path to leaf for each example but it probably won't generalize to new examples•Prefer to find more compact decision treesHypothesis spacesHow many distinct decision trees with n Boolean attributes?= number of Boolean functions= number of distinct truth tables with 2n rows = 22n•E.g., with 6 Boolean attributes, there are 18,446,744,073,709,551,616 treesHypothesis spacesHow many distinct decision trees with n Boolean attributes?= number of Boolean functions= number of distinct truth tables with 2n rows = 22n•E.g., with 6 Boolean attributes, there are 18,446,744,073,709,551,616 treesHow many purely conjunctive hypotheses (e.g., Hungry  Rain)?•Each attribute can be in (positive), in (negative), or out 3n distinct conjunctive hypotheses•More expressive hypothesis space–increases chance that target function can be expressed–increases number of hypotheses consistent with training set may get worse predictionsEntropy•“Measure of uncertainty”•“Expected number of bits to resolve uncertainty”•Suppose Pr{X = 0} = 1/8–If other events are equally likely, the number of events is 8. To indicate one out of so many events, one needs lg 8 bits.•Consider a binary random variable X s.t. Pr{X = 0} = 0.1.–The expected number of bits:•In general, if a random variable X has c values with prob. p1, p2,…,pc:–The expected number of bits:  1.011lg1.011.01lg1.01 11lg lgc ci i ii iiH p p pp= == =-� �Entropy of a binary variable     pppppH  1lg1lgDivide and Conquer•Internal decision nodes–Univariate: Uses a single attribute, xi•Numeric xi : Binary split : xi > wm•Discrete xi : n-way split for n possible values–Multivariate: Uses all attributes, x•Leaves–Classification: Class labels, or proportions–Regression: Numeric; r average, or local fit•The learning algorithm is greedy; find the best split recursivelyDecision tree learning•Aim: find a small tree consistent with the training examples•Idea: (recursively) choose "most significant" attribute as root of (sub)treeLearning decision treesProblem: decide whether to wait for a table at a restaurant, based on the following attributes:1. Alternate: is there an alternative restaurant nearby?2. Bar: is there a comfortable bar area to wait in?3. Fri/Sat: is today Friday or Saturday?4. Hungry: are we hungry?5. Patrons: number of people in the restaurant (None, Some, Full)6. Price: price range ($, $$, $$$)7. Raining: is it raining outside?8. Reservation: have we made a reservation?9. Type: kind of restaurant (French, Italian, Thai, Burger)10. WaitEstimate: estimated waiting time (0-10, 10-30, 30-60, >60)Attribute-based representations•Examples described by attribute values (Boolean, discrete, continuous)•E.g., situations where I will/won't wait for a table:•Classification of examples is positive (T) or negative (F)Decision trees•One possible representation for hypotheses•E.g., here is the “true” tree for deciding whether to wait:Decision trees•Another possible representation for hypothesesChoosing an attribute•Idea: a good attribute splits the examples into subsets that are (ideally) "all positive" or "all negative"•Patrons? is a better choice•Using information theory•To implement Choose-Attribute in the DTL


View Full Document
Download Lecture Note
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture Note and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture Note 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?