Gini impurity measures how likely a randomly selected item would be misclassified if it received a label drawn from its subset’s class distribution. A pure subset has one class; a mixed subset has greater impurity. section 5.1
A classification tree uses Gini impurity to compare candidate feature splits. It prefers splits whose resulting subsets are more homogeneous, typically combining the child impurities with their subset sizes. section 5.1
Choosing a split efficiently
For an Airbnb price-range classification task, latitude offers many possible thresholds. Testing every unique latitude took about 46.9 seconds; evaluating 256 histogram-bin thresholds produced the same selected split and score in about 562 milliseconds. section 5.4.3




