📞 0339-0387701 (WhatsApp) Contact

« Back to Data Science & AI (NCCIA)

What is the Gini impurity used for in decision trees?

A. Measuring the height of the tree
B. Counting the number of features
C. Measuring how mixed the classes are in a node, as an alternative to entropy for choosing splits ✅
D. Measuring the accuracy on test data

Correct Answer: C. Measuring how mixed the classes are in a node, as an alternative to entropy for choosing splits

Explanation

Gini impurity is zero for a pure node and maximal when classes are evenly mixed; trees can split to minimise it.