Skip to content

Decision Tree

MinhDungDo edited this page Dec 13, 2020 · 6 revisions

Decision Tree Example

Definition of Decision Tree and Tree Structure

Tree-like model is an abstract data type that stores elements hierarchically. A tree consists of:

  • A set of nodes
  • A set of edges, each of which connects a pair of nodes Relationships between nodes:
  • If a node is connected to other nodes that are directly below it in the tree, that node is referred to as their parent node and they are referred to as its children node.
  • Each node can have up most one parent node.
  • Nodes with the same parent are siblings Type of nodes:
  • A leaf node is node without children
  • An interior node is a node with one or more children
  • Each node in the tree is the root of a smaller tree Path, Depth, Level and Height:
  • There is exactly one path (one sequence of edges) connecting each node to the root.
  • Depth of a node = # of edges on the path from it to the root
  • Nodes with the same depth form a level of the tree.
  • The height of a tree is the maximum depth of its nodes.

Clone this wiki locally