Need help with understanding Decision Trees I am struggling to understand how decision trees work. I understand that you need to calculate the Gini coefficients for the sample features and that's how leaves are chosen.
My issue is that I don't understand how to find which leaf node corresponds to which class. Furthermore, how does this algorithm deal with multi-class classification?

After splitting with respect to some criterion (e.g. gini, information gain etc.) the samples you're left with in the leaf node decides the class. Typically, the majority class is chosen, or in some situations, a probability might be more preferable (e.g. a probability vector). It doesn't matter if the problem is multi-class or binary.
