introduction to machine learning cart computational
play

Introduction to Machine Learning CART: Computational Aspects of - PowerPoint PPT Presentation

Introduction to Machine Learning CART: Computational Aspects of Finding Splits compstat-lmu.github.io/lecture_i2ml MONOTONE FEATURE TRANSFORMATIONS Monotone transformations of one or several features will neither change the value of the


  1. Introduction to Machine Learning CART: Computational Aspects of Finding Splits compstat-lmu.github.io/lecture_i2ml

  2. MONOTONE FEATURE TRANSFORMATIONS Monotone transformations of one or several features will neither change the value of the splitting criterion nor the structure of the tree, only the numerical value of the split point. Original data Data with log-transformed x x 1 2 7.0 10 20 log(x) 0 0.7 1.9 2.3 3 y 1 1 0.5 10 11 y 1 1.0 0.5 10.0 11 � c Introduction to Machine Learning – 1 / 7

  3. CART: NOMINAL FEATURES A split on a nominal feature partitions the feature levels: x j ∈ { a , c , e } ← N → x j ∈ { b , d } For a feature with m levels, there are about 2 m different possible partitions of the m values into two groups (2 m − 1 − 1 because of symmetry and empty groups). Searching over all these becomes prohibitive for larger values of m . For regression with squared loss and binary classification, we can define clever shortcuts. � c Introduction to Machine Learning – 2 / 7

  4. CART: NOMINAL FEATURES For 0 − 1 responses, in each node: Calculate the proportion of 1-outcomes for each category of the 1 feature in N . Sort the categories according to these proportions. 2 The feature can then be treated as if it was ordinal, so we only 3 have to investigate at most m − 1 splits. � c Introduction to Machine Learning – 3 / 7

  5. CART: NOMINAL FEATURES 1) 2) 3) Frequency of class 1 Frequency of class 1 Frequency of class 1 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 0.0 0.0 0.0 A B C D B A D C B A D C Category of feature Category of feature Category of feature � c Introduction to Machine Learning – 4 / 7

  6. CART: NOMINAL FEATURES This procedure finds the optimal split. This result also holds for regression trees (with squared error loss) if the levels of the feature are ordered by increasing mean of the target The proofs are not trivial and can be found here: for 0-1 responses: Breiman, 1984, Classification and Regression Trees. Ripley, 1996, Pattern Recognition and Neural Networks. for continuous responses: Fisher, 1958, On grouping for maximum homogeneity. Such simplifications are not known for multiclass problems. � c Introduction to Machine Learning – 5 / 7

  7. CART: NOMINAL FEATURES For continuous responses, in each node: Calculate the mean of the outcome in each category 1 Sort the categories by increasing mean of the outcome 2 1) 2) 3) 12.5 12.5 12.5 Mean of outcome Mean of outcome Mean of outcome 10.0 10.0 10.0 7.5 7.5 7.5 5.0 5.0 5.0 2.5 2.5 2.5 0.0 0.0 0.0 A B C D D A B C D A B C Category of feature Category of feature Category of feature � c Introduction to Machine Learning – 6 / 7

  8. CART: MISSING FEATURE VALUES When splits are evaluated, only observations for which the used feature is not missing are used. (This can actually bias splits towards using features with lots of missing values.) CART often uses the so-called surrogate split principle to automatically deal with missing values in features used for splits during prediction. Surrogate splits are created during training. They define replacement splitting rules using a different feature that result in almost the same child nodes as the original split. When observations are passed down the tree (in training or prediction), and the feature value used in a split is missing, we use a "surrogate split" instead to decide to which branch of the tree the data should be assigned. � c Introduction to Machine Learning – 7 / 7

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend