Machine Learning, AI, ML, Decision Trees, Probability.
of the set, they belong to different classes. Now we can calculate the Gini index for both of our sets. For clarity, the calculation of the Gini index for set 1 is illustrated in figure 5 (with red and blue replaced by black and white). Set 1: {red, red, red, red, red, red, red, red, blue, blue}