Decision Trees Introduction

Decision Trees Introduction

How do we classify the below dataset ?
images/machine_learning/supervised/decision_trees/decision_trees_introduction/slide_01_01.tif

💡It can be written as nested 🕸️ if else statements.

e.g: To classify the left bottom corner red points we can write:
👉if (FeatureX1 <1 & FeatureX2 <1)

⭐️Extending the logic for all, we have an if else ladder like below:

images/machine_learning/supervised/decision_trees/decision_trees_introduction/slide_03_01.tif

👉Final decision boundaries will be something like below:

images/machine_learning/supervised/decision_trees/decision_trees_introduction/slide_04_01.tif
What is a Decision Tree 🌲?
  • Non-parametric model.
  • Recursively partitions the feature space.
  • Top-down, greedy approach to iteratively select feature splits.
  • Maximize purity of a node, based on metrics, such as, Information Gain 💵 or Gini 🧞‍♂️Impurity.

Note: We can extract the if/else logic of the decision tree and write in C++/Java for better performance.

Computation 💻
images/machine_learning/supervised/decision_trees/decision_trees_introduction/computation_complexity.png
Decision Tree 🌲 Analysis

⭐️Building an optimal decision tree 🌲 is a NP-Hard problem.
👉(Time Complexity: Exponential; combinatorial search space)

  • Pros
    • No standardization of data needed.
    • Highly interpretable.
    • Good runtime performance.
    • Works for both classification & regression.
  • Cons
    • Number of dimensions should not be too large. (Curse of dimensionality)
    • Overfitting.
When to use Decision Tree 🌲
  • As base learners in ensembles, such as, bagging(RF), boosting(GBDT), stacking, cascading, etc.
  • As a baseline, interpretable, model or for quick feature selection.
  • Runtime performance is important.



End of Section