Module org.elasticsearch.xcore
Class TreeNode
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
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final Stringstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldstatic final ParseFieldFields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLEFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TreeNode.Builderbuilder(int nodeIndex) booleanstatic TreeNode.BuilderfromXContent(XContentParser parser, boolean lenient) double[]intintlongintintdoubledoubleinthashCode()booleanbooleanisLeaf()longtoString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResourcesMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
- See Also:
-
DECISION_TYPE
-
THRESHOLD
-
LEFT_CHILD
-
RIGHT_CHILD
-
DEFAULT_LEFT
-
SPLIT_FEATURE
-
NODE_INDEX
-
SPLIT_GAIN
-
LEAF_VALUE
-
NUMBER_SAMPLES
-
-
Constructor Details
-
TreeNode
- Throws:
IOException
-
-
Method Details
-
fromXContent
-
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
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
toString
-
builder
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-