What is the difference between min_samples_split and min_samples_leaf?

Quick Overview

Asks how the decision tree hyperparameters min_samples_split and min_samples_leaf differ. It tests whether you know which node each one checks, how the two interact, and how each one controls overfitting in a tree.

What is the difference between min_samples_split and min_samples_leaf?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

In a decision tree (for example scikit-learn's `DecisionTreeClassifier` or `DecisionTreeRegressor`), what is the difference between `min_samples_split` and `min_samples_leaf`? ```hint Which node is checked For each parameter, ask which node it looks at when a split is evaluated: the node being split, or the children the split would produce. ``` ### What a Strong Answer Covers - Which node each parameter constrains and when the check happens - A concrete split that one parameter allows and the other blocks - How the two interact, including the minimum node size that `min_samples_leaf` implies - The accepted value types, and which parameter is the more effective regularizer and why ### Follow-up Questions - How would you tune these two together with `max_depth` in a cross-validated search? - Why does a leaf with very few samples give unreliable class probabilities? - What would you use instead when the training rows carry sample weights?

Overview: Asks how the decision tree hyperparameters min_samples_split and min_samples_leaf differ. It tests whether you know which node each one checks, how the two interact, and how each one controls overfitting in a tree.

PracHub logo
General
Nov 25, 2026
easyMachine Learning EngineerOtherMachine Learning
0
0

In a decision tree (for example scikit-learn's DecisionTreeClassifier or DecisionTreeRegressor), what is the difference between min_samples_split and min_samples_leaf?

What a Strong Answer Covers Guidance

  • Which node each parameter constrains and when the check happens
  • A concrete split that one parameter allows and the other blocks
  • How the two interact, including the minimum node size that min_samples_leaf implies
  • The accepted value types, and which parameter is the more effective regularizer and why

Follow-up Questions Guidance

  • How would you tune these two together with max_depth in a cross-validated search?
  • Why does a leaf with very few samples give unreliable class probabilities?
  • What would you use instead when the training rows carry sample weights?