0% found this document useful (0 votes)
11 views

Understanding of Working of DECISION TREE CART Algorithm

Decision tree

Uploaded by

Vamsi Vamsi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Understanding of Working of DECISION TREE CART Algorithm

Decision tree

Uploaded by

Vamsi Vamsi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

DECISION TREE

Classification And Regression Tree (CART)

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


1 Decision Tree

2 Algorithms involved in Decision Tree

3 CART & Its History

4 Applications
CONTENTS
5 Steps involved in building CART

6 Hyperparameters

7 Advantages & Disadvantages

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


1 Decision Tree

• A decision tree is a non-parametric


supervised learning algorithm. ROOT
NODE
• Which is utilized for both classification and
regression tasks. SUB TREE
SPLITTING DECISION
• It has a hierarchical, tree structure. NODE

• Which consists of a root node, branches,


internal nodes and leaf nodes. LEAF NODE

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


2 Algorithms involved in Decision Tree

• ID3 (Iterative Dichotomiser 3)

• C4.5 (successor of ID3)

• CART (Classification And Regression Tree)

• Chi-square automatic interaction detection (CHAID).

• MARS extends decision trees to handle numerical data better.

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


3 CART & History

CART - CLASSIFICATION AND REGRESSION TREES

CLASSIFICATION : REGRESSION:

INPUT: A KID WITH FRUITS INPUT: A KID WITH FRUITS


OUTPUT: WILL HE EAT OR NOT OUTPUT: HOW MANY FRUITS HE EATS

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


3 CART & History

CART

WHY CART?
Leo Breiman Friedman Olshen Stone

1984

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


3 CART & History

Handles only Handles Numerical and


categorical variables categorical variable

Multiway Splits Binary Splits

ID3, C4.5 CART


Not suitable for Efficiently works
Large Datasets for Large Datasets

Difficulty in handling Efficiently handles


missing data missing data

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


4 Applications

Disease – Yes / No
Medical
Disease - Severity

Loan – Yes / No

Where Banking

Loan – Amount

Customer Churn – Yes / No

Telecom
Pricing Strategies - Tariffs

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


5 Steps involved in building CART

Column 1 Gini impurity High purity

Dataset Column 2 Gini impurity Mid purity Decision

Column 3 Gini impurity Low purity

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


5 Steps involved in building CART

C = number of columns
GINI IMPURITY
Pi = proportion of ith class label

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


6 Hyperparameters

Regressor
Criteria - (“squared_error”, “friedman_mse”, “absolute_error”, “poisson”)
Splitter – (“best”, “random”)
Max_depth – (adjusting depth of tree)
Min_sample_split – (min no.of samples required to split an internal node)
Min_sample_leaf – (min no.of samples required to be at a leaf node)
Max_leaf_nodes – (tree with max_leaf_nodes in best-first fashion )
Max_features – (no.of features to consider for the best split)

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


6 Hyperparameters

Classifier
Criteria - (“gini”, “entropy”, “log_loss”)
Splitter – (“best”, “random”)
Max_depth – (adjusting depth of tree)
Min_sample_split – (min no.of samples required to split an internal node)
Min_sample_leaf – (min no.of samples required to be at a leaf node)
Max_leaf_nodes – (tree with max_leaf_nodes in best-first fashion )
Max_features – (“auto”, “sqrt”, “log2”)

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


7 Advantages and Disadvantages

Advantages
More robust in the presence of outliers

Not affected by monotonic transformations of variables

Automatic handling of the following:

Variable selection
Variable interaction modelling
Local effect modelling
Nonlinear relationship modelling
Missing values

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


7 Advantages and Disadvantages

Disadvantages
High variance and unstable if new data comes.

Doesn’t work well if data has many uncorrelated problem

Calculations involved can also become complex compared to


other algorithms, and it takes a longer time to train the model.

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795


THANKYOU

J.S A I VARDHAN | B ATCH – 130 | EMP ID : 4795

You might also like