java.lang.Object
org.elasticsearch.client.ml.inference.trainedmodel.tree.Tree
All Implemented Interfaces:
NamedXContentObject, TrainedModel, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class Tree extends Object implements TrainedModel
  • Field Details

    • NAME

      public static final String NAME
      See Also:
    • FEATURE_NAMES

      public static final org.elasticsearch.xcontent.ParseField FEATURE_NAMES
    • TREE_STRUCTURE

      public static final org.elasticsearch.xcontent.ParseField TREE_STRUCTURE
    • TARGET_TYPE

      public static final org.elasticsearch.xcontent.ParseField TARGET_TYPE
    • CLASSIFICATION_LABELS

      public static final org.elasticsearch.xcontent.ParseField CLASSIFICATION_LABELS
  • Method Details

    • fromXContent

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

      public String getName()
      Specified by:
      getName in interface NamedXContentObject
      Specified by:
      getName in interface TrainedModel
      Returns:
      The name of the model
    • getFeatureNames

      public List<String> getFeatureNames()
      Specified by:
      getFeatureNames in interface TrainedModel
      Returns:
      List of featureNames expected by the model. In the order that they are expected
    • getNodes

      public List<TreeNode> getNodes()
    • getClassificationLabels

      @Nullable public List<String> getClassificationLabels()
    • getTargetType

      public TargetType getTargetType()
    • 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()