Decision Tree
Dr. Varun Kumar
Dr. Varun Kumar Machine Learning-6 1 / 12
Outlines
1 What is classification ?
2 Types of classification
3 Introduction to Decision Tree
4 Terminology associated with decision tree
5 Visualizing a decision tree
6 References
Dr. Varun Kumar Machine Learning-6 2 / 12
What is classification ?
What is classification ?
Classification is process for dividing a datasets into a different categories
or groups by adding label. Ex-
1 Checking a legitimate mail and spam mail by G-mail/Hot-mail etc.
2 Credit card notification (same card is used for very long distance) →
Fishy transaction.
3 Classification of fruits: Taste, size, color, etc
Types of classification
1 Decision tree
2 Random forest
3 Naive Baye’s
4 K-Nearest neighbor (KNN)
Dr. Varun Kumar Machine Learning-6 3 / 12
Introduction to decision tree
Decision tree
⇒ Graphical representation of all the possible solution to a decisions.
⇒ Decisions are based on some conditions.
⇒ Decision made can be easily explained.
Note: Decision tree can also be used for the solving of regression problem.
Dr. Varun Kumar Machine Learning-6 4 / 12
SBI card customer care IVR flow
Dr. Varun Kumar Machine Learning-6 5 / 12
Eye disease detection
Dr. Varun Kumar Machine Learning-6 6 / 12
Playing Tennis
Dr. Varun Kumar Machine Learning-6 7 / 12
Banking system
Dr. Varun Kumar Machine Learning-6 8 / 12
Terminology associated with decision tree
Dr. Varun Kumar Machine Learning-6 9 / 12
Continued–
Branch node: The node, where other branches or nodes are connected.
Node 1, 2
Leaf node: The node, where other branches or nodes are not connected.
Node 3, 4, 5
Node 1 is called as root node.
Dr. Varun Kumar Machine Learning-6 10 / 12
Classification and regression trees (CART) algorithm
How does a tree decide, where to split:
GINI index
Information gain
Reduction in variance
Chi-square
Dr. Varun Kumar Machine Learning-6 11 / 12
References
E. Alpaydin, Introduction to machine learning. MIT press, 2020.
J. Grus, Data science from scratch: first principles with python. O’Reilly Media,
2019.
T. M. Mitchell, The discipline of machine learning. Carnegie Mellon University,
School of Computer Science, Machine Learning , 2006, vol. 9.
S. Haykin, Neural Networks and Learning Machines, 3/E. Pearson Education
India, 2010.
Dr. Varun Kumar Machine Learning-6 12 / 12

Decision tree (Machine Learning)

  • 1.
    Decision Tree Dr. VarunKumar Dr. Varun Kumar Machine Learning-6 1 / 12
  • 2.
    Outlines 1 What isclassification ? 2 Types of classification 3 Introduction to Decision Tree 4 Terminology associated with decision tree 5 Visualizing a decision tree 6 References Dr. Varun Kumar Machine Learning-6 2 / 12
  • 3.
    What is classification? What is classification ? Classification is process for dividing a datasets into a different categories or groups by adding label. Ex- 1 Checking a legitimate mail and spam mail by G-mail/Hot-mail etc. 2 Credit card notification (same card is used for very long distance) → Fishy transaction. 3 Classification of fruits: Taste, size, color, etc Types of classification 1 Decision tree 2 Random forest 3 Naive Baye’s 4 K-Nearest neighbor (KNN) Dr. Varun Kumar Machine Learning-6 3 / 12
  • 4.
    Introduction to decisiontree Decision tree ⇒ Graphical representation of all the possible solution to a decisions. ⇒ Decisions are based on some conditions. ⇒ Decision made can be easily explained. Note: Decision tree can also be used for the solving of regression problem. Dr. Varun Kumar Machine Learning-6 4 / 12
  • 5.
    SBI card customercare IVR flow Dr. Varun Kumar Machine Learning-6 5 / 12
  • 6.
    Eye disease detection Dr.Varun Kumar Machine Learning-6 6 / 12
  • 7.
    Playing Tennis Dr. VarunKumar Machine Learning-6 7 / 12
  • 8.
    Banking system Dr. VarunKumar Machine Learning-6 8 / 12
  • 9.
    Terminology associated withdecision tree Dr. Varun Kumar Machine Learning-6 9 / 12
  • 10.
    Continued– Branch node: Thenode, where other branches or nodes are connected. Node 1, 2 Leaf node: The node, where other branches or nodes are not connected. Node 3, 4, 5 Node 1 is called as root node. Dr. Varun Kumar Machine Learning-6 10 / 12
  • 11.
    Classification and regressiontrees (CART) algorithm How does a tree decide, where to split: GINI index Information gain Reduction in variance Chi-square Dr. Varun Kumar Machine Learning-6 11 / 12
  • 12.
    References E. Alpaydin, Introductionto machine learning. MIT press, 2020. J. Grus, Data science from scratch: first principles with python. O’Reilly Media, 2019. T. M. Mitchell, The discipline of machine learning. Carnegie Mellon University, School of Computer Science, Machine Learning , 2006, vol. 9. S. Haykin, Neural Networks and Learning Machines, 3/E. Pearson Education India, 2010. Dr. Varun Kumar Machine Learning-6 12 / 12