|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.sandia.cognition.learning.algorithm.tree.AbstractDecisionTreeNode<InputType,Double,InteriorType>
gov.sandia.cognition.learning.algorithm.tree.RegressionTreeNode<InputType,InteriorType>
InputType
- The input type for the tree.InteriorType
- The type that is the output of the decision made at
this tree node.public class RegressionTreeNode<InputType,InteriorType>
The RegressionTreeNode
implements a DecisionTreeNode
for
a tree that does regression.
Field Summary | |
---|---|
static double |
DEFAULT_VALUE
The default value for the node is 0.0. |
protected Evaluator<? super InputType,Double> |
scalarFunction
The function to apply for leaf nodes. |
protected double |
value
The value stored at the tree node. |
Fields inherited from class gov.sandia.cognition.learning.algorithm.tree.AbstractDecisionTreeNode |
---|
childMap, decider, incomingValue, parent |
Constructor Summary | |
---|---|
RegressionTreeNode()
Creates a new instance of RegressionTreeNode. |
|
RegressionTreeNode(DecisionTreeNode<InputType,Double> parent,
Categorizer<? super InputType,? extends InteriorType> decider,
double value)
Creates a new instance of RegressionTreeNode. |
|
RegressionTreeNode(DecisionTreeNode<InputType,Double> parent,
Categorizer<? super InputType,? extends InteriorType> decider,
Evaluator<? super InputType,Double> scalarFunction,
double value,
Object incomingValue)
Creates a new instance of RegressionTreeNode. |
|
RegressionTreeNode(DecisionTreeNode<InputType,Double> parent,
double value)
Creates a new instance of RegressionTreeNode. |
|
RegressionTreeNode(DecisionTreeNode<InputType,Double> parent,
Evaluator<? super InputType,Double> scalarFunction,
double value)
Creates a new instance of RegressionTreeNode. |
|
RegressionTreeNode(DecisionTreeNode<InputType,Double> parent,
Evaluator<? super InputType,Double> scalarFunction,
double value,
Object incomingValue)
Creates a new instance of RegressionTreeNode. |
Method Summary | |
---|---|
RegressionTreeNode<InputType,InteriorType> |
clone()
Creates a new clone (shallow copy) of this object. |
Double |
getOutput(InputType input)
Gets the local output of this node for the given input. |
Evaluator<? super InputType,Double> |
getScalarFunction()
Gets the scalar function applied to the input when the node is a leaf node. |
double |
getValue()
Gets the value stored at the node, which is usually the mean value. |
void |
setScalarFunction(Evaluator<? super InputType,Double> scalarFunction)
Sets the scalar function applied to the input when the node is a leaf node. |
void |
setValue(double value)
Sets the value stored at the node, which is usually the mean value. |
Methods inherited from class gov.sandia.cognition.learning.algorithm.tree.AbstractDecisionTreeNode |
---|
addChild, chooseChild, getChildMap, getChildren, getDecider, getDepth, getIncomingValue, getParent, getTreeSize, isLeaf, setChildMap, setDecider, setIncomingValue, setParent |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double DEFAULT_VALUE
protected Evaluator<? super InputType,Double> scalarFunction
protected double value
Constructor Detail |
---|
public RegressionTreeNode()
public RegressionTreeNode(DecisionTreeNode<InputType,Double> parent, double value)
parent
- The parent node of this node. Null if this is a root.value
- The value stored at the node.public RegressionTreeNode(DecisionTreeNode<InputType,Double> parent, Categorizer<? super InputType,? extends InteriorType> decider, double value)
parent
- The parent node of this node. Null if this is a root.decider
- The decision function for interior nodes.value
- The value stored at the node.public RegressionTreeNode(DecisionTreeNode<InputType,Double> parent, Evaluator<? super InputType,Double> scalarFunction, double value)
parent
- The parent node of this node. Null if this is a root.scalarFunction
- The scalar function to apply at leaf nodes.value
- The value stored at the node.public RegressionTreeNode(DecisionTreeNode<InputType,Double> parent, Evaluator<? super InputType,Double> scalarFunction, double value, Object incomingValue)
parent
- The parent node of this node. Null if this is a root.scalarFunction
- The scalar function to apply at leaf nodes.value
- The value stored at the node.incomingValue
- The incoming value.public RegressionTreeNode(DecisionTreeNode<InputType,Double> parent, Categorizer<? super InputType,? extends InteriorType> decider, Evaluator<? super InputType,Double> scalarFunction, double value, Object incomingValue)
parent
- The parent node of this node. Null if this is a root.decider
- The decision function for interior nodes.scalarFunction
- The scalar function to apply at leaf nodes.value
- The value stored at the node.incomingValue
- The incoming value.Method Detail |
---|
public RegressionTreeNode<InputType,InteriorType> clone()
CloneableSerializable
clone
in interface CloneableSerializable
clone
in class AbstractDecisionTreeNode<InputType,Double,InteriorType>
public Double getOutput(InputType input)
DecisionTreeNode
input
- The input.
public Evaluator<? super InputType,Double> getScalarFunction()
public void setScalarFunction(Evaluator<? super InputType,Double> scalarFunction)
scalarFunction
- The scalar function applied to the input for leaves.public double getValue()
public void setValue(double value)
value
- The value stored at the node.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |