Skip to main content
. 2021 Dec 7;23(12):1641. doi: 10.3390/e23121641
Algorithm 2Ch (construction of the tree Γ(k)(T)).

Input: T (a nonempty decision table), Δ(T) (the directed acyclic graph for T), and k (a natural number between 1 to 5).

Output: A decision tree Γ(k)(T).

  1. Check all nodes of the DAG Δ(T) whether there is a decision tree attached to each node. If yes, then return the tree attached to the node T as Γ(k)(T) and break the algorithm. If not, select a node Θ of the graph Δ(T) that does not have an attached tree. It can be either a leaf node of Δ(T) or an internal node of Δ(T) where all children are tagged with trees.

  2. If Θ is a leaf node, then attach to it the decision tree Γ(k)(Θ) that have only a single node. This node is tagged with the decision attached to all rows of Θ. Move to step 1.

  3. If Θ is not a leaf node, then do the following according to the value k:

    • When k=1, construct the tree Γa(1)(Θ) and attach it to Θ as the tree Γ(1)(Θ).

    • When k=2, construct the tree Γh(2)(Θ) and attach it to Θ as the tree Γ(2)(Θ).

    • When k=3, construct the trees Γa(3)(Θ) and Γh(3)(Θ), choose between them a tree with the minimum depth and attach it to Θ as the tree Γ(3)(Θ).

    • When k=4, construct the tree Γp(4)(Θ) and attach it to Θ as the tree Γ(4)(Θ).

    • When k=5, construct the trees Γa(5)(Θ) and Γp(5)(Θ), choose between them a tree with the minimum depth and attach it to Θ as the tree Γ(5)(Θ).

    Move to step 1.