Docsity

Learning from Observations - Artificial Inteligence - Lecture Slides, Slides of Artificial Intelligence

Partial preview of the text

Download Learning from Observations - Artificial Inteligence - Lecture Slides and more Slides Artificial Intelligence in PDF only on Docsity!

Learning from Observations

Chapter 18

Section 1 – 3

Outline

• Learning agents

• Inductive learning

• Decision tree learning

Learning agents

Learning 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 rewards

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:

Learning decision trees

Problem: 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)

Expressiveness

  • 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 (unless f nondeterministic in x ) but it probably won't generalize to new examples
  • Prefer to find more compact decision trees

Hypothesis spaces

How many distinct decision trees with n Boolean attributes? = number of Boolean functions = number of distinct truth tables with 2 n^ rows = 2 2 n

  • E.g., with 6 Boolean attributes, there are 18,446,744,073,709,551,616 trees

Decision tree learning

  • Aim: find a small tree consistent with the training examples
  • Idea: (recursively) choose "most significant" attribute as root of (sub)tree

Choosing an attribute

  • Idea: a good attribute splits the examples into subsets that are (ideally) "all positive" or "all negative"
  • Patrons? is a better choice