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
  • 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

  • Method Details

    • fromXContentStrict

      public static Tree fromXContentStrict(org.elasticsearch.xcontent.XContentParser parser)
    • fromXContentLenient

      public static Tree fromXContentLenient(org.elasticsearch.xcontent.XContentParser parser)
    • getName

      public String getName()
      Specified by:
      getName in interface NamedXContentObject
      Returns:
      The name of the XContentObject that is to be serialized
    • targetType

      public TargetType targetType()
      Specified by:
      targetType in interface TrainedModel
      Returns:
      TargetType for the model.
    • getWriteableName

      public String getWriteableName()
      Specified by:
      getWriteableName in interface NamedWriteable
    • writeTo

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

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

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

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

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

      public static Tree.Builder builder()
    • validate

      public void validate()
      Description copied from interface: TrainedModel
      Runs validations against the model. Example: Tree should check if there are any loops
      Specified by:
      validate in interface TrainedModel
    • estimatedNumOperations

      public long estimatedNumOperations()
      Specified by:
      estimatedNumOperations in interface TrainedModel
      Returns:
      The estimated number of operations required at inference time
    • ramBytesUsed

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

      public Collection<org.apache.lucene.util.Accountable> getChildResources()
      Specified by:
      getChildResources in interface org.apache.lucene.util.Accountable
    • getMinimalCompatibilityVersion

      public TransportVersion getMinimalCompatibilityVersion()
      Specified by:
      getMinimalCompatibilityVersion in interface TrainedModel