edu.uci.jforests.learning.trees.decision
Class DecisionTree
- java.lang.Object
-
- edu.uci.jforests.learning.trees.Tree
-
- edu.uci.jforests.learning.trees.decision.DecisionTree
-
- All Implemented Interfaces:
- java.lang.Cloneable
public class DecisionTree extends Tree
-
-
Constructor Summary
Constructors Constructor and Description DecisionTree()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidbackfit(Sample sample)intclassify(Dataset dataset, int instanceIndex)java.lang.Objectclone()double[]getDistributionForInstance(Dataset dataset, int instanceIndex)double[]getLeafTargetDistribution(int leaf)int[]getPredictions(Dataset dataset)voidinit(int maxLeaves, int numClasses)voidloadCustomData(java.lang.String str)voidsetLeafTargetDistribution(int leaf, double[] dist)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, int numClasses)
-
getLeafTargetDistribution
public double[] getLeafTargetDistribution(int leaf)
-
setLeafTargetDistribution
public void setLeafTargetDistribution(int leaf, double[] dist)
-
classify
public int classify(Dataset dataset, int instanceIndex)
-
getDistributionForInstance
public double[] getDistributionForInstance(Dataset dataset, int instanceIndex)
-
getPredictions
public int[] getPredictions(Dataset dataset)
-
split
public int split(int leaf, TreeSplit split)turns 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