Machine Learning, Decision Tree, Python, Tutorial, Learning.
understanding of entropy, let’s plot the impurity index for the probability range [0, 1] for class 1. The code is as follows: As you can see, entropy is 0 if ​p(i=1|t) = 1. If the classes are distributed uniformly with p(i=1|t) = 0.5​, entropy is 1. Now, returning to our Iris example, we will