Module org.elasticsearch.xcore
Class Tree
java.lang.Object
org.elasticsearch.xpack.core.ml.inference.trainedmodel.tree.Tree
- All Implemented Interfaces:
org.apache.lucene.util.Accountable,NamedWriteable,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,LenientlyParsedTrainedModel,StrictlyParsedTrainedModel,TrainedModel,NamedXContentObject
public class Tree
extends Object
implements LenientlyParsedTrainedModel, StrictlyParsedTrainedModel, org.apache.lucene.util.Accountable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.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 org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.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 Tree.Builderbuilder()booleanlongstatic TreefromXContentLenient(org.elasticsearch.xcontent.XContentParser parser) static TreefromXContentStrict(org.elasticsearch.xcontent.XContentParser parser) Collection<org.apache.lucene.util.Accountable> getName()inthashCode()longtoString()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidvalidate()Runs validations against the model.voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
public static final org.elasticsearch.xcontent.ParseField NAME -
FEATURE_NAMES
public static final org.elasticsearch.xcontent.ParseField FEATURE_NAMES -
TREE_STRUCTURE
public static final org.elasticsearch.xcontent.ParseField TREE_STRUCTURE -
CLASSIFICATION_LABELS
public static final org.elasticsearch.xcontent.ParseField CLASSIFICATION_LABELS
-
-
Constructor Details
-
Tree
- Throws:
IOException
-
-
Method Details
-
fromXContentStrict
-
fromXContentLenient
-
getName
- Specified by:
getNamein interfaceNamedXContentObject- Returns:
- The name of the XContentObject that is to be serialized
-
targetType
- Specified by:
targetTypein interfaceTrainedModel- Returns:
TargetTypefor the model.
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode() -
builder
-
validate
public void validate()Description copied from interface:TrainedModelRuns validations against the model. Example:Treeshould check if there are any loops- Specified by:
validatein interfaceTrainedModel
-
estimatedNumOperations
public long estimatedNumOperations()- Specified by:
estimatedNumOperationsin interfaceTrainedModel- Returns:
- The estimated number of operations required at inference time
-
ramBytesUsed
public long ramBytesUsed()- Specified by:
ramBytesUsedin interfaceorg.apache.lucene.util.Accountable
-
getChildResources
- Specified by:
getChildResourcesin interfaceorg.apache.lucene.util.Accountable
-
getMinimalCompatibilityVersion
- Specified by:
getMinimalCompatibilityVersionin interfaceTrainedModel
-