1
$\begingroup$

If I've multiple attributes of a variable say weather (Windy, Cloudy, Overcast). After calculating the Gini index of each value. I've to apply CART algorithm, as it works on binary split. which pair of combination of values would i need to go for (with less or high Gini ) ? enter image description here

$\endgroup$

migrated from stackoverflow.com Jan 3 '17 at 21:27

This question came from our site for professional and enthusiast programmers.

3
$\begingroup$

Refere to this: https://en.wikipedia.org/wiki/Decision_tree_learning#Gini_impurity

Gini impurity is a measure of how often a randomly chosen element from the set would be incorrectly labeled if it was randomly labeled according to the distribution of labels in the subset. ... It reaches its minimum (zero) when all cases in the node fall into a single target category.

At each split, the CART algorithm needs to choose the attributes that gives the highest information gain or least gini impurity. Hence you should choose the split that gives less gini impurity, i.e., 0.167.

$\endgroup$
  • $\begingroup$ Is there anyway I can contact you outside SO ? $\endgroup$ – NATS Jan 3 '17 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy