supervised learning
play

Supervised learning Cluster analysis and association rules are not - PowerPoint PPT Presentation

Supervised learning Cluster analysis and association rules are not concerned with a specific target attribute. Supervised learning refers to problems where the value of a target attribute should be predicted based on the values of other


  1. Supervised learning Cluster analysis and association rules are not concerned with a specific target attribute. Supervised learning refers to problems where the value of a target attribute should be predicted based on the values of other attributes. Problems with a categorical target attribute are called classification, problems with a numerical target attribute are called regression. Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 1 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  2. Finding explanations Attributes: Class C , other attributes A (1) , . . . , A ( m ) Data: S = { ( x i , c i ) | i = 1 , . . . , N } Finding interpretable model to understand dependency of target attribute c i and the input vectors x i . Model will not express necessarily the causal relationship, but only numerical correlations. Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 2 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  3. Decision trees Find hierarchical structure to explain how different areas in the input space correspond to different outcomes Useful for data with a lot of attributes of unknown importance Insensitive to normalization issues Tolerant to correlated and noisy attributes Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 3 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  4. A very simple decision tree Assignment of a drug to a patient: Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 4 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  5. Classification with decision trees Recursive Descent: Start at the root node. If the current node is an leaf node : ◦ Return the class assigned to the node. If the current node is an inner node : ◦ Test the attribute associated with the node. ◦ Follow the branch labeled with the outcome of the test. ◦ Apply the algorithm recursively. Intuitively: Follow the path corresponding to the case to be classified. Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 5 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  6. Classification with decision trees Assignment of a drug to a 30 year old patient with normal blood pressure: Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 6 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  7. Classification with decision trees Assignment of a drug to a 30 year old patient with normal blood pressure: Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 7 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  8. Classification with decision trees Assignment of a drug to a 30 year old patient with normal blood pressure: Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 8 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  9. Classification with decision trees Disjunction of conjunctions Drug A ⇔ Blood pressure = high ∨ Blood pressure = normal ∧ Age ≤ 40 Drug B ⇔ Blood pressure = low ∨ Blood pressure = normal ∧ Age > 40 Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 9 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  10. Induction of decision trees Top-down approach ◦ Build the decision tree from top to bottom (from the root to the leaves). Greedy selection of a test attribute ◦ Compute an evaluation measure for all attributes. ◦ Select the attribute with the best evaluation. Divide and conquer / recursive descent ◦ Divide the example cases according to the values of the test attribute. ◦ Apply the procedure recursively to the subsets. ◦ Terminate the recursion if – all cases belong to the same class or – no more test attributes are available Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 10 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  11. Decision tree induction: Example No Sex Age Blood pr. Drug Patient database 1 male 20 normal A 2 female 73 normal B 12 example cases 3 female 37 high A 3 descriptive attributes 4 male 33 low B 5 female 48 high A 1 class attribute 6 male 29 normal A 7 female 52 normal B Assignment of drug 8 male 42 low B 9 male 61 normal B (without patient attributes) 10 female 30 normal A always drug A or always drug B: 11 female 26 low B 12 male 54 high A 50% correct (in 6 of 12 cases) Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 11 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  12. Decision tree induction: Example Sex of the patient No Sex Drug 1 male A Division w.r.t. male/female. 6 male A 12 male A 4 male B 8 male B Assignment of drug 9 male B male: 50% correct (in 3 of 6 cases) 3 female A female: 50% correct (in 3 of 6 cases) 5 female A total: 50% correct (in 6 of 12 cases) 10 female A 2 female B 7 female B 11 female B Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 12 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  13. Decision tree induction: Example Blood pressure of the patient No Blood pr. Drug 3 high A Division w.r.t. high/normal/low. 5 high A 12 high A 1 normal A Assignment of drug 6 normal A high: A 100% correct (in 3 of 3 cases) 10 normal A normal: 50% correct (in 3 of 6 cases) 2 normal B low: B 100% correct (in 3 of 3 cases) 7 normal B total: 75% correct (in 9 of 12 cases) 9 normal B 4 low B 8 low B 11 low B Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 13 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  14. Decision tree induction: Example Age of the patient No Age Drug 1 20 A Sort according to age. 11 26 B 6 29 A Find best age split. 10 30 A here: ca. 40 years 4 33 B 3 37 A Assignment of drug 8 42 B ≤ 40 : A 67% correct (in 4 of 6 cases) 5 48 A > 40 : B 67% correct (in 4 of 6 cases) 7 52 B total: 67% correct (in 8 of 12 cases) 12 54 A 9 61 B 2 73 B Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 14 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  15. Decision tree induction: Example Current decision tree: Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 15 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  16. Decision tree induction: Example No Blood pr. Sex Drug Blood pressure and sex 3 high A 5 high A 12 high A Only patients 1 normal male A 6 normal male A with normal blood pressure. 9 normal male B 2 normal female B 7 normal female B Division w.r.t. 10 normal female A 4 low B male/female. 8 low B 11 low B Assignment of drug male: A 67% correct (2 of 3) female: B 67% correct (2 of 3) total: 67% correct (4 of 6) Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 16 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  17. Decision tree induction: Example No Blood pr. Age Drug Blood pressure and age 3 high A 5 high A 12 high A Only patients 1 normal 20 A with normal blood pressure. 6 normal 29 A 10 normal 30 A 7 normal 52 B Sort according to age. 9 normal 61 B 2 normal 73 B Find best age split. 11 low B 4 low B here: ca. 40 years 8 low B Assignment of drug ≤ 40 : A 100% correct (3 of 3) > 40 : B 100% correct (3 of 3) total: 100% correct (6 of 6) Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 17 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

  18. Decision tree induction: Example Resulting decision tree: Compendium slides for “Guide to Intelligent Data Analysis”, Springer 2011. 18 / 81 � Michael R. Berthold, Christian Borgelt, Frank H¨ c oppner, Frank Klawonn and Iris Ad¨ a

Recommend


More recommend