rfgb.tree module¶
Data structures and methods for learning decision trees.
-
class
rfgb.tree.
node
(test=None, examples=None, information=None, level=None, parent=None, pos=None)[source]¶ Bases:
object
A node in a tree.
Parameters: - expandQueue – Breadth first search node expansion strategy
- depth – initial depth is 0 because no node present
- maxDepth – max depth set to 1 because we want to at least learn a tree of depth 1
- learnedDecisionTree – this will hold all the clauses learned
- data – stores all the facts, positive and negative examples
-
data
= None¶
-
depth
= 0¶
-
expandQueue
= []¶
-
getTrueExamples
(clause, test, data)[source]¶ Returns all examples that satisfy the clause with conjoined test literal.
-
learnedDecisionTree
= []¶
-
maxDepth
= 1¶