# Tree terminology

## Tree

- The Tree structure represents a hierarchical segmentation of the base selection. At each branch in the tree, the base selection is split into tow sub-selections.

## Node

- Each *node* is a sub-selection of the full base selection. A node can be said to "contain" a number of people/products etc (depending on the resolve level of the selections) from the full base selection.
- Since the analysis selection is a subset of the base (e.g. the people who went to Sweden), each node will contain a sub-selection of the full analysis selection.
- The purpose of a Decision Tree is to create nodes which have a particularly high or particularly low proportion of people from the analysis selection (the *Analysis %*).

## Root node

- The *root node* is the starting node of the tree and contains the full base selection.

## Branch node (Child node)

- A number of *child nodes* are formed whenever a node is split. All the records within a node that is split are allocated to one of the child nodes.
- There will be a selection rule associated with each child node (e.g. “Income \<£20k”) which describes how this child is formed from its parent.

## Node Rule

- The *node rule* is the selection rule associated with each child node (e.g. "Income \<20k").
- Strictly speaking, this describes how the child is formed from its parent (last rule).
- In practice, the *full rule* is more useful, as this describes how to form a node starting from the root node. It is simply the individual rules from each branch node along the path followed to reach the node in question.

## Parent node

- A *parent node* is one that has been split from child nodes. All the records within a node that is split are allocated to one of the child nodes.

## Leaf node

- A *leaf node* is one that is not split further. It is therefore at the end of a series of branch nodes.

## Depth (Level)

- The *level* or *depth* of a particular node relates to how many splits are needed to get from the root node to the node in question.
- The root node is defined as being level 1 and depth 1.

## Number of Nodes, Node count

- This is a count of how many nodes are in the tree and includes the root node.
- A tree with no splits would have a node count of 1 (the root node itself).
