Conceptual
Login

Selecting Decision Tree Split Attributes with Cross Entropy and Gini Index in Machine Learning

Decision-tree induction selects the attribute at each node by evaluating an impurity measure — cross entropy or the Gini index — over the candidate partitions and choosing the attribute (and, for binary trees, the split point) that minimizes the class-proportion-weighted impurity of the resulting child nodes. Both measures are computed from the proportion of observations of each class within a node, admit simplified two-class forms (−p log p − (1−p) log(1−p) for cross entropy and 2p(1−p) for Gini), and are combined across children by weighting each child's impurity by its share of the parent's observations. Tree construction is recursive: the chosen attribute partitions the data, each branch is grown from the restricted subset with the already-used attributes removed, and recursion halts at a pure node (impurity zero) or, when attributes are exhausted without purity, at a leaf labelled by the majority class — placing the topic in supervised classification within machine learning.