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

Decision Tree

The document discusses decision trees and the Gini index, which is a measure of how pure the classes in a node are. The Gini index ranges from 0 to 1, with 0 representing a pure node and 1 representing a randomly distributed node. When building a decision tree, the attribute with the least Gini index is preferred as the root node.

Uploaded by

SEELAM ALEXANDER
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Decision Tree

The document discusses decision trees and the Gini index, which is a measure of how pure the classes in a node are. The Gini index ranges from 0 to 1, with 0 representing a pure node and 1 representing a randomly distributed node. When building a decision tree, the attribute with the least Gini index is preferred as the root node.

Uploaded by

SEELAM ALEXANDER
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Decision Trees

If all the elements belong to a single class, then it can be called pure.
Gini Index
The Gini Index or Gini Impurity is calculated by subtracting the sum of the squared
probabilities of each class from one

If all the elements belong to a single class, then it can be called pure.

'0' denotes that all elements belong to a certain class or there exists only one class
(pure)

'1' denotes that the elements are randomly distributed across various classes
(impure).
C
Gini  1   pi2
i 1
The degree of Gini Index varies between 0 and 1,

While building the decision tree , we would prefer to choose the attribute/feature with
the least Gini Index as the root node.

The Gini Impurity of a pure node is zero

You might also like