java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.tree.TreeNode
All Implemented Interfaces:
org.apache.lucene.util.Accountable, Writeable, ToXContent, ToXContentObject

public class TreeNode extends Object implements ToXContentObject, Writeable, org.apache.lucene.util.Accountable
  • Field Details

    • NAME

      public static final String NAME
      See Also:
    • DECISION_TYPE

      public static final ParseField DECISION_TYPE
    • THRESHOLD

      public static final ParseField THRESHOLD
    • LEFT_CHILD

      public static final ParseField LEFT_CHILD
    • RIGHT_CHILD

      public static final ParseField RIGHT_CHILD
    • DEFAULT_LEFT

      public static final ParseField DEFAULT_LEFT
    • SPLIT_FEATURE

      public static final ParseField SPLIT_FEATURE
    • NODE_INDEX

      public static final ParseField NODE_INDEX
    • SPLIT_GAIN

      public static final ParseField SPLIT_GAIN
    • LEAF_VALUE

      public static final ParseField LEAF_VALUE
    • NUMBER_SAMPLES

      public static final ParseField NUMBER_SAMPLES
  • Constructor Details

  • Method Details

    • fromXContent

      public static TreeNode.Builder fromXContent(XContentParser parser, boolean lenient)
    • getOperator

      public Operator getOperator()
    • getThreshold

      public double getThreshold()
    • getSplitFeature

      public int getSplitFeature()
    • getNodeIndex

      public int getNodeIndex()
    • getSplitGain

      public double getSplitGain()
    • getLeafValue

      public double[] getLeafValue()
    • isDefaultLeft

      public boolean isDefaultLeft()
    • getLeftChild

      public int getLeftChild()
    • getRightChild

      public int getRightChild()
    • isLeaf

      public boolean isLeaf()
    • getNumberSamples

      public long getNumberSamples()
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Specified by:
      writeTo in interface Writeable
      Throws:
      IOException
    • toXContent

      public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • builder

      public static TreeNode.Builder builder(int nodeIndex)
    • ramBytesUsed

      public long ramBytesUsed()
      Specified by:
      ramBytesUsed in interface org.apache.lucene.util.Accountable