Machine Learning, Decision Tree, Python, Tutorial, Learning.
Using scikit-learn, we will now train a decision tree with a maximum depth of 4. The code is as follows: Notice that we set the criterion as ‘entropy’. This criterion is known as the impurity measure (mentioned in the previous section). In classification, entropy is the most common impurity measure