What is the difference between an internal node and a leaf node in a decision tree?

Quick Overview

Asks how internal nodes and leaf nodes differ in a decision tree, including what each one stores and how a prediction is produced. Tests basic understanding of tree structure, split rules, stopping criteria and pruning.

What is the difference between an internal node and a leaf node in a decision tree?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: easy

Interview Round: Other

What is the difference between an internal node and a leaf node in a decision tree? ```hint Follow one sample Trace a single sample from the root to the bottom of a tree. Which nodes ask it something, and which node gives the answer? ``` ### What a Strong Answer Covers - What an internal node stores and does, and where the root fits - What a leaf stores and how its prediction is computed for classification and for regression - When tree growing stops and a node becomes a leaf - How the leaves relate to the feature space and to pruning ### Follow-up Questions - A binary tree has $k$ internal nodes. How many leaves does it have, and why? - How does a regression leaf's prediction change if the tree is trained with absolute error instead of squared error? - How does cost-complexity pruning decide which internal nodes to collapse into leaves? - Why are the class proportions in the leaves of a very deep tree poor probability estimates?

Overview: Asks how internal nodes and leaf nodes differ in a decision tree, including what each one stores and how a prediction is produced. Tests basic understanding of tree structure, split rules, stopping criteria and pruning.

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

What is the difference between an internal node and a leaf node in a decision tree?

What a Strong Answer Covers Guidance

  • What an internal node stores and does, and where the root fits
  • What a leaf stores and how its prediction is computed for classification and for regression
  • When tree growing stops and a node becomes a leaf
  • How the leaves relate to the feature space and to pruning

Follow-up Questions Guidance

  • A binary tree has kk internal nodes. How many leaves does it have, and why?
  • How does a regression leaf's prediction change if the tree is trained with absolute error instead of squared error?
  • How does cost-complexity pruning decide which internal nodes to collapse into leaves?
  • Why are the class proportions in the leaves of a very deep tree poor probability estimates?