Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 3: Decision Tree Learning. Decision Tree Learning t Introduction t Decision Tree Representation t Appropriate Problems for Decision Tree Learning.

Similar presentations


Presentation on theme: "Chapter 3: Decision Tree Learning. Decision Tree Learning t Introduction t Decision Tree Representation t Appropriate Problems for Decision Tree Learning."— Presentation transcript:

1 Chapter 3: Decision Tree Learning

2 Decision Tree Learning t Introduction t Decision Tree Representation t Appropriate Problems for Decision Tree Learning t Basic Algorithm t Hypothesis Space Search in Decision Tree Learning t Inductive Bias in Decision Tree Learning t Issues in Decision Tree Learning t Summary

3 Introduction t A method for approximating discrete-valued target functions t Easy to convert learned tree into if-then rule t ID3, ASSISTANT, C4.5 t Preference bias to smaller trees. t Search a completely expressive hypothesis space

4 Decision Tree Representation t Root -> leaf 로 sorting 하면서 학습에로 분류 t Node: attribute 테스트 t Branch: attribute’s value 에 해당 t Disjunction of conjunctions of constraints on the attribute values of instances

5

6 Appropriate Problems for Decision tree Learning t Instances are represented by attribute-value pairs t The target function has discrete output values t Disjunctive descriptions may be required t The training data may contain errors t The training data may contain missing attribute values

7 Basic Algorithm t 가능한 모든 decision trees space 에서의 top- down, greedy search t Training examples 를 가장 잘 분류 할 수 있는 attribute 를 루트에 둔다. t Entropy, Information gain

8

9 Entropy t Minimum number of bits of information needed to encode the classification of an arbitrary member of S t entropy = 0, if all members in the same class t entropy = 1, if |positive examples|=|negative examples|

10 Entropy(S) 1.00.01.0

11 Information Gain t Expected reduction in entropy caused by partitioning the examples according to attribute A t Attribute A 를 앎으로서 얻어지는 entropy 의 축소 정도

12

13

14 Which Attribute is the Best Classifier? (1) Humidity High Normal S:[9+, 5-] E=0.940 [3+, 4-] E=0.985 [6+, 1-] E=0.592

15 Which Attribute is the Best Classifier? (2) Wind Weak Strong S:[9+, 5-] E=0.940 [6+, 2-] E=0.811 [3+, 3-] E=1.000 Classifying examples by Humidity provides more information gain than by Wind.

16

17 Hypothesis Space Search in Decision Tree Learning (1) t Training examples 에 적합한 하나의 hypothesis 를 찾 는다. t ID3 의 hypothesis space  the set of possible decision trees t Simple-to-complex, hill-climbing search t I nformation gain => hill-climbing 의 guide

18

19 Hypothesis Space Search in Decision tree Learning (2) t Complete space of finite discrete-valued functions t Single current hypothesis 만 유지한다. t No back-tracking t 탐색의 각 단계에서 모든 training examples 고려 - 통계적인 결정을 내림

20 Inductive Bias (1) - Case ID3 t Examples 에 부합되는 decision tree 들 중 어 느 decision tree 를 선택해야 할 것인가 ? t Shorter trees are preferred over larger trees, t Trees that place high information gain attributes close to the root are preferred.

21 Inductive Bias (2)

22 Inductive Bias (3) t Occam’s razor  Prefer the simplest hypothesis that fits the data t Major difficulty  학습의 내부 표현에 의해 hypothesis 의 크기가 다양 할 수 있다.

23 Issues in Decision Tree Learning t How deeply to grow the decision tree t Handling continuous attributes t Choosing an appropriate attribute selection measure t Handling the missing attribute values

24 Avoiding Overfitting the Data (1) t Training examples 를 완벽하게 분류할 때까지 tree 를 성장시킴 ?  1. Data 에 noise 가 있을 때  2. Training examples 수가 적을 때 t Overfit: training data 에 대한 hypothesis h,h’ 가 있을 때  h 의 error < h’ 의 error, (training examples 에 대해서 )  h 의 error > h’ 의 error, ( 전체 인스턴스에 대해서 )

25

26 Avoiding Overfitting the Data (2) t 해결책  1.examples 를 training set 과 validation set 으로 나눈다.  2. 모든 data 는 training 으로 사용하고, 특정 노드의 절단이 성능을 시킬 수 있는 지 통계적으로 검사한다.  3.Training examples, decision tree 를 encoding 하는 복잡도 를 측정하는 explicit measure 개발 -chapter 6 t 1 번 방식 : training and validation set approach  validation set => hypothesis 의 pruning 효과 측정

27 Reduced Error Pruning t validation set 에 대하여, 노드가 절단된 tree 가 원래의 tree 보다 나쁘지 않은 결과를 나타낼 때, 그 노드를 삭제한다. t Training set 에서 우연하게 추가된 leaf 노드가 절단될 가능성이 있다.  이 같은 우연성이 validation set 에서도 나타나기는 힘들기 때문 t Training set, test set, validation set 으로 구성 t 단점 : data 의 수가 적을 때

28

29 Rule Post-Pruning (1) 1. Decision tree 를 만든다. (overfitting 허용 ) 2. Root 에서 leaf 에 이르는 rule 로 변환 3. Precondition 을 제거함으로써 estimated accuracy 을 향상시키는 rule 을 절단 4. Estimated accuracy 에 따라 sort 한다. Subsequent instance 를 분류할 때 정렬된 순으로 적용한다.

30 Rule Post-Pruning (2) t Pruning 전에 decision tree 를 rule 로 변환하는 이유  Decision node 가 사용되는 별개의 context 들을 구별 할 수 있다.  Root 나 leaf 노드에서의 attribute 테스트를 구분할 필 요 없다.

31 Incorporating Continuous- Valued Attributes Information gain 을 최대가 되게 하는 threshold 를 고른다. Attribute value 에 따라 sort 한다. t Target classification 이 변하는 pair 를 고른다. t 이 pair 의 중간값을 threshold 후보로 본다. t 이 후보들 중 information gain 을 최대로 하는 것을 선 택 Temperature: 40 48 60 72 80 90 PlayTennis: No Yes No

32 Alternative Measures for Selecting Attributes (1) t Information gain measure 는 많은 value 를 가진 attribute 를 선호한다. Attribute Data (e.g. March 4. 1979) Attribute Data (e.g. March 4. 1979) Training data 에 대해서는 target attribute 를 완벽하게 분류 Training data 에 대해서는 target attribute 를 완벽하게 분류 좋은 predictor 는 되지 못한다 좋은 predictor 는 되지 못한다 Extreme example Extreme example

33 Alternative Measures for Selecting Attributes (2) t attribute A 의 value 에 대한 관점에서의 S 에 대한 entropy 이다. n 개의 data 를 n 개의 value 가 완벽하게 분류한다면n 개의 data 를 n 개의 value 가 완벽하게 분류한다면 2 부분으로 완벽하게 나누는 2 개의 value 를 가진다면2 부분으로 완벽하게 나누는 2 개의 value 를 가진다면

34 Alternative Measures for Selecting Attributes(3)

35 Handling Training Examples with Missing Attribute Values t node n 에 있는 examples 중에서 C(x) 를 가지는 것들 중 가장 흔한 attribute value 를 할당함 t attribute A 의 가능한 value 에 대해 확 률값을 할당.  Node n 에 있는 A 의 value 의 frequency 를 관찰함으로써 알 수 있다.

36 Handling Attributes with Differing Costs

37 Summary t ID3 family = root rule 부터 downward 로 성장, next best attribute 를 greedy search t Complete hypothesis space t Preference for smaller trees t Overfitting avoidance by Post-pruning


Download ppt "Chapter 3: Decision Tree Learning. Decision Tree Learning t Introduction t Decision Tree Representation t Appropriate Problems for Decision Tree Learning."

Similar presentations


Ads by Google