cascading.pattern.model.tree
Class Tree
java.lang.Object
cascading.pattern.model.tree.Tree
- All Implemented Interfaces:
- Serializable
public class Tree
- extends Object
- implements Serializable
Class Tree defines a decision tree.
A Tree is literally a tree data structure where every possible branch is governed by a predicate, when
traversed, a branch is chosen if the predicate returns true against the current Tuple
.
When a leaf node is reached the "score" is returned, where the score can be a category or numeric value.
When a set of Tree instances should be applied, see ParallelEnsembleAssembly
for constructing a random forest implementation.
- See Also:
- Serialized Form
graph
protected org.jgrapht.graph.SimpleDirectedGraph<Node,Integer> graph
root
protected Node root
Tree
public Tree(String rootID)
getRoot
public Node getRoot()
getScores
public Set<Object> getScores()
getGraph
public org.jgrapht.DirectedGraph<Node,Integer> getGraph()
addPredicate
public void addPredicate(String fromID,
String toID,
Predicate predicate)
addPredicate
public void addPredicate(String fromID,
String toID,
Predicate predicate,
Object score)
createDecisionTree
public DecisionTree createDecisionTree(Fields argumentFields)
createDecisionTree
public DecisionTree createDecisionTree(String[] categories,
Fields argumentFields)
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2007-2015 Concurrent, Inc. All Rights Reserved.