Decision trees begin with class counts at a root node. This lesson sets up the exact parent counts that every later split must preserve.

highlighted = computed this step

Questions make branches

A decision tree routes rows by feature questions. The root starts with 3 positive and 3 negative rows.

root counts=[3,3]\text{root counts}=[3,3]
Parent countsThe root starts with the shown class counts.Parent nodeparentcounts=[3, 3]G=1/2

Why counts come first

The split arithmetic uses class counts, not decimal estimates. Counts are the exact input to every Gini value.

countsexact fractions\text{counts}\rightarrow\text{exact fractions}
Parent countsThe root starts with the shown class counts.Parent nodeparentcounts=[3, 3]G=1/2

Summary

The parent node is the displayed source. Later splits must preserve these same class totals.

parent total=6\text{parent total}=6
Parent countsThe root starts with the shown class counts.Parent nodeparentcounts=[3, 3]G=1/2