← All interview questions

Skill Zuno · skillzunos.com · Python ML

Decision Tree Classification interview questions

Prepare for Decision Tree Classification interviews on Skill Zuno. This practice book covers Decision Tree Classification interview questions across New, Easy, Medium, Hard, and Diff levels so you can work through real interview-style problems on skillzunos.com.

Open Decision Tree Classification on Skill Zuno

Also see the Decision Tree Classification tutorial.

Decision tree classification predicts a class by asking a sequence of questions about features, splitting the data to make each group as pure as possible. Trees are easy to visualise and explain, handle mixed data types and need no scaling, but single trees overfit. Interviews cover Gini impurity and entropy, information gain, stopping rules, pruning and class imbalance.

Sample Decision Tree Classification interview questions

What is Gini impurity?

The probability of mislabelling a random sample if it were labelled randomly according to the node's class distribution: 1 − Σp². It is 0 for a pure node.

What is the difference between Gini and entropy?

Both measure impurity and usually choose very similar splits. Gini is slightly faster because it avoids logarithms; entropy is based on information theory.

What is information gain?

The reduction in impurity from a split: the parent's impurity minus the weighted impurity of its children. The tree picks the split with the highest gain.

Why do decision trees overfit?

They can keep splitting until every leaf is pure, which memorises noise. Limit depth, set a minimum leaf size, or prune.

How do decision trees handle categorical features in scikit-learn?

Scikit-learn trees need numeric input, so categories are one-hot or ordinal encoded first. Recent versions can handle missing values natively.

What you can practice

  • Decision Tree Classification interview questions for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • Python ML topics alongside Decision Tree Classification on skillzunos.com

More Python ML interview questions

All interview questions