Presentation is loading. Please wait.

Presentation is loading. Please wait.

Learning from Data.

Similar presentations


Presentation on theme: "Learning from Data."— Presentation transcript:

1 Learning from Data

2 Focus on Supervised Learning first… Given previous data, how can we “learn” to classify new data?

3 APPLE APPLE BANANA BANANA APPLE or BANANA? APPLE

4 Learned model/ Classifier
Training Learned model/ Classifier Training Set Extract features/ labels Train Decision Trees Bayesian Learning Neural Nets...

5 Training Classifying Learned model/ Classifier Training Set Extract
features/ labels Train Decision Trees Bayesian Learning Neural Nets... Classifying Learned model/ Classifier Label Instance/Example Extract features

6 Inductive Learning Supervised Learning:
Training data is a set of (x, y) pairs x: input example/instance y: output/label Learn an unknown function f(x)=y x represented by D-dimensional feature vector x = < x1 , x2 , x3 ,…, xD > Each dimension is a feature or attribute

7 Wait for a Table?

8 Wait for a Table? T: Positive/Yes examples (better to wait for a table) F: Negative/No examples (better not wait)

9 All examples with Patrons=None were No Patrons = Some were Yes Examples with Patrons = Full depended on other features

10 Decision Trees

11 How to classify new example?
All examples with Patrons=None were No Patrons = Some were Yes Examples with Patrons = Full depended on other features

12 How to classify new example?
All examples with Patrons=None were No Patrons = Some were Yes Examples with Patrons = Full depended on other features

13 Classifying a New Example

14 Which one is better? All examples with Patrons=None were No Patrons = Some were Yes Examples with Patrons = Full depended on other features

15 Better because smaller

16 Decision Trees How to find the smallest decision tree?

17 Constructing the “best” decision tree
NP-hard to find smallest tree, so just try to fall a “smallish” decision tree. First, how to construct any decision tree?

18 Construct Tree Example
F Full $ Italian 30-60 Patrons = None (All False)

19 Construct Tree Example
F Full $ Italian 30-60 Patrons = Some (All True)

20 Construct Tree Example
F Full $ Italian 30-60 Patrons = Full (Some True, Some False)

21 Construct Tree Example
F Full $ Italian 30-60 Patrons = Full (Some True, Some False) AND Hungry = False

22 Construct Tree Example
F Full $ Italian 30-60 Patrons = Full (Some True, Some False) AND Hungry = True

23 Choosing the Best Feature
Compare Type and Patrons Which one seems better? True examples False examples False True

24 Choosing the Best Feature
Compare Type and Patrons Which one seems better? At each node select the feature that divides the examples into sets which are almost all positive or all negative. Yes examples No examples


Download ppt "Learning from Data."

Similar presentations


Ads by Google