gov.sandia.cognition.learning.algorithm.tree
Class RegressionTree<InputType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.tree.DecisionTree<InputType,Double>
          extended by gov.sandia.cognition.learning.algorithm.tree.RegressionTree<InputType>
Type Parameters:
InputType - The input type the regression tree evaluates.
All Implemented Interfaces:
Evaluator<InputType,Double>, Regressor<InputType>, ScalarFunction<InputType>, CloneableSerializable, Serializable, Cloneable

public class RegressionTree<InputType>
extends DecisionTree<InputType,Double>
implements Regressor<InputType>

The RegressionTree class extends the DecisionTree class to implement a decision tree that does regression.

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

Field Summary
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.tree.DecisionTree
rootNode
 
Constructor Summary
RegressionTree()
          Creates a new instance of RegressionTree.
RegressionTree(DecisionTreeNode<InputType,Double> rootNode)
          Creates a new instance of RegressionTree.
 
Method Summary
 double evaluateAsDouble(InputType input)
          Evaluates the scalar function as a double.
 
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
 

Constructor Detail

RegressionTree

public RegressionTree()
Creates a new instance of RegressionTree.


RegressionTree

public RegressionTree(DecisionTreeNode<InputType,Double> rootNode)
Creates a new instance of RegressionTree.

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

evaluateAsDouble

public double evaluateAsDouble(InputType input)
Description copied from interface: ScalarFunction
Evaluates the scalar function as a double.

Specified by:
evaluateAsDouble in interface ScalarFunction<InputType>
Parameters:
input - The input value.
Returns:
The scalar output calculated from the given input.