Decision trees in normal form #
The paths of a decision tree to leaves labelled true are the terms of a formula in disjunctive
normal form computing the same function (DecisionTree.toDNF), and the paths to leaves labelled
false, negated, are the clauses of a formula in conjunctive normal form (DecisionTree.toCNF).
A path reads each variable at most once, a variable read again following the branch of its first
reading, so the terms and clauses have distinct variables and at most depth literals
Jukna, Section 14.1. So a function of decision tree depth t is a disjunction of
terms and a conjunction of clauses of width at most t.
Main definitions #
Cslib.DecisionTree.map: relabel the leaves of a decision tree.Cslib.DecisionTree.toDNF,Cslib.DecisionTree.toCNF: the normal forms of a decision tree.
Main results #
Cslib.DecisionTree.eval_toDNF,Cslib.DecisionTree.eval_toCNF: they compute the tree.Cslib.DecisionTree.length_le_depth_of_mem_toDNF,Cslib.DecisionTree.length_le_depth_of_mem_toCNF: their width is at most the depth.
References #
Relabel the leaves of a decision tree.
Instances For
The terms of the paths of a decision tree to leaves labelled true, each extending the term
p of the path so far; a variable already in p is not read again.
Instances For
The formula in disjunctive normal form of the paths of a decision tree to leaves labelled
true.
Instances For
The formula in conjunctive normal form of the negated paths of a decision tree to leaves
labelled false.
Instances For
The paths to leaves labelled true compute the tree.
The negated paths to leaves labelled false compute the tree.
The terms of the normal form of a tree have at most depth literals.
The terms of the normal form of a tree read each variable once.
The clauses of the conjunctive normal form of a tree have at most depth literals.