gov.sandia.cognition.learning.algorithm.tree
Class CategorizationTree<InputType,OutputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.tree.DecisionTree<InputType,OutputType>
          extended by gov.sandia.cognition.learning.algorithm.tree.CategorizationTree<InputType,OutputType>
Type Parameters:
InputType - The input type to categorize.
OutputType - The output category type.
All Implemented Interfaces:
Evaluator<InputType,OutputType>, Categorizer<InputType,OutputType>, CloneableSerializable, Serializable, Cloneable

public class CategorizationTree<InputType,OutputType>
extends DecisionTree<InputType,OutputType>
implements Categorizer<InputType,OutputType>

The CategorizationTree class extends the DecisionTree class to implement a decision tree that does categorization.

Since:
2.0
Author:
Justin Basilico
See Also:
Serialized Form

Field Summary
protected  Set<OutputType> categories
          The list of possible output categories.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.tree.DecisionTree
rootNode
 
Constructor Summary
CategorizationTree()
          Creates a new instance of CategorizationTree.
CategorizationTree(DecisionTreeNode<InputType,OutputType> rootNode, Set<OutputType> categories)
          Creates a new instance of CategorizationTree.
 
Method Summary
 Set<OutputType> getCategories()
          Gets the list of possible categories that the categorizer can produce.
 void setCategories(Set<OutputType> categories)
          Sets the possible output categories.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.tree.DecisionTree
evaluate, evaluateNode, findTerminalNode, findTerminalNode, getRootNode, setRootNode
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.evaluator.Evaluator
evaluate
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Field Detail

categories

protected Set<OutputType> categories
The list of possible output categories.

Constructor Detail

CategorizationTree

public CategorizationTree()
Creates a new instance of CategorizationTree.


CategorizationTree

public CategorizationTree(DecisionTreeNode<InputType,OutputType> rootNode,
                          Set<OutputType> categories)
Creates a new instance of CategorizationTree.

Parameters:
rootNode - The root node of the tree.
categories - The possible output categories.
Method Detail

getCategories

public Set<OutputType> getCategories()
Gets the list of possible categories that the categorizer can produce.

Specified by:
getCategories in interface Categorizer<InputType,OutputType>
Returns:
The list of possible categories.

setCategories

public void setCategories(Set<OutputType> categories)
Sets the possible output categories.

Parameters:
categories - The collection of possible output categories.