Documentation of 'edu.uci.jforests.learning.trees.Tree' Java class
Tree
edu.uci.jforests.learning.trees

Class Tree

  • All Implemented Interfaces:
    java.lang.Cloneable
    Direct Known Subclasses:
    DecisionTree, RegressionTree


    public abstract class Tree
    extends java.lang.Object
    implements java.lang.Cloneable
    • Field Detail

      • numLeaves

        public int numLeaves
    • Constructor Detail

      • Tree

        public Tree()
    • Method Detail

      • init

        public void init(int maxLeaves)
      • getLeftChild

        public int getLeftChild(int node)
      • setLeftChild

        public void setLeftChild(int node,
                                 int newChild)
      • getRightChild

        public int getRightChild(int node)
      • setRightChild

        public void setRightChild(int node,
                                  int newChild)
      • getSplitFeature

        public int getSplitFeature(int node)
      • getThreshold

        public int getThreshold(int node)
      • getOriginalThreshold

        public double getOriginalThreshold(int node)
      • getLeaf

        public int getLeaf(Dataset dataset,
                           int instanceIndex)
      • getLeafFromOriginalThreshold

        public int getLeafFromOriginalThreshold(Dataset dataset,
                                                int instanceIndex)
      • getLeafFromOriginalThreshold

        public int getLeafFromOriginalThreshold(double[] featureVector)
      • getParent

        public int getParent(int node)
      • getNodeParents

        public int[] getNodeParents(int node)
        Returns list of node parents
      • loadLeavesInSubtree

        public void loadLeavesInSubtree(int node,
                                        java.util.List<java.lang.Integer> leaves)
        Extracts the list of leaves that belong to the subtree which which has 'node' as its root. The result is added to 'leaves' input list.
      • split

        public int split(int leaf,
                         TreeSplit split)
        turns a leaf of the tree into an internal node with two leaf-children
      • loadCustomData

        public abstract void loadCustomData(java.lang.String str)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • toString

        public java.lang.String toString(double weight,
                                         int indentationLevel)
      • loadFromString

        public void loadFromString(int numLeaves,
                                   java.lang.String splitFeaturesLine,
                                   java.lang.String leftChildrenLine,
                                   java.lang.String rightChildrenLine,
                                   java.lang.String thresholdsLine,
                                   java.lang.String originalThresholdsLine)
                            throws java.lang.Exception
        Throws:
        java.lang.Exception
      • backfit

        public abstract void backfit(Sample sample)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.