edu.uci.jforests.learning.trees.regression
Class RegressionTree
- java.lang.Object
-
- edu.uci.jforests.learning.trees.Tree
-
- edu.uci.jforests.learning.trees.regression.RegressionTree
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class RegressionTree extends Tree
-
-
Constructor Summary
Constructors Constructor and Description RegressionTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidbackfit(Sample sample)java.lang.Objectclone()doublegetLeafOutput(int leaf)doublegetOutput(Dataset dataset, int instanceIndex)double[]getOutputs(Dataset dataset)voidincrementLeafOutputs(double constant)voidinit(int maxLeaves, double maxLeafOutput)voidloadCustomData(java.lang.String str)voidmultiplyLeafOutputs(double factor)voidnormalizeNodeNames()Renames node names in the tree to make them as 0, 1, 2, ..., nvoidsetLeafOutput(int leaf, double output)intsplit(int leaf, TreeSplit split)turns a leaf of the tree into an internal node with two leaf-children-
Methods inherited from class edu.uci.jforests.learning.trees.Tree
getLeaf, getLeafFromOriginalThreshold, getLeafFromOriginalThreshold, getLeftChild, getNodeParents, getOriginalThreshold, getParent, getRightChild, getSplitFeature, getThreshold, init, loadFromString, loadLeavesInSubtree, setLeftChild, setRightChild, toString
-
-
-
-
Method Detail
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
init
public void init(int maxLeaves, double maxLeafOutput)
-
normalizeNodeNames
public void normalizeNodeNames()
Renames node names in the tree to make them as 0, 1, 2, ..., n
-
getLeafOutput
public double getLeafOutput(int leaf)
-
setLeafOutput
public void setLeafOutput(int leaf, double output)
-
multiplyLeafOutputs
public void multiplyLeafOutputs(double factor)
-
incrementLeafOutputs
public void incrementLeafOutputs(double constant)
-
getOutput
public double getOutput(Dataset dataset, int instanceIndex)
-
getOutputs
public double[] getOutputs(Dataset dataset)
-
split
public int split(int leaf, TreeSplit split)Description copied from class:Treeturns a leaf of the tree into an internal node with two leaf-children
-
loadCustomData
public void loadCustomData(java.lang.String str) throws java.lang.Exception- Specified by:
loadCustomDatain classTree- Throws:
java.lang.Exception
-
-
DMelt 3.0 © DataMelt by jWork.ORG