java.lang.Object
org.opensearch.ml.common.input.parameter.clustering.KMeansParams
All Implemented Interfaces:
org.opensearch.core.common.io.stream.NamedWriteable, org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContent, org.opensearch.core.xcontent.ToXContentObject, MLAlgoParams

public class KMeansParams extends Object implements MLAlgoParams
  • Field Details

    • PARSE_FIELD_NAME

      public static final String PARSE_FIELD_NAME
    • XCONTENT_REGISTRY

      public static final org.opensearch.core.xcontent.NamedXContentRegistry.Entry XCONTENT_REGISTRY
    • CENTROIDS_FIELD

      public static final String CENTROIDS_FIELD
      See Also:
    • ITERATIONS_FIELD

      public static final String ITERATIONS_FIELD
      See Also:
    • DISTANCE_TYPE_FIELD

      public static final String DISTANCE_TYPE_FIELD
      See Also:
  • Constructor Details

  • Method Details

    • parse

      public static MLAlgoParams parse(org.opensearch.core.xcontent.XContentParser parser) throws IOException
      Throws:
      IOException
    • getWriteableName

      public String getWriteableName()
      Specified by:
      getWriteableName in interface org.opensearch.core.common.io.stream.NamedWriteable
    • writeTo

      public void writeTo(org.opensearch.core.common.io.stream.StreamOutput out) throws IOException
      Specified by:
      writeTo in interface org.opensearch.core.common.io.stream.Writeable
      Throws:
      IOException
    • toXContent

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

      public int getVersion()
      Specified by:
      getVersion in interface MLAlgoParams
    • builder

      public static KMeansParams.KMeansParamsBuilder builder()
    • toBuilder

    • getCentroids

      public Integer getCentroids()
    • getIterations

      public Integer getIterations()
    • getDistanceType

      public KMeansParams.DistanceType getDistanceType()
    • setCentroids

      public void setCentroids(Integer centroids)
    • setIterations

      public void setIterations(Integer iterations)
    • setDistanceType

      public void setDistanceType(KMeansParams.DistanceType distanceType)
    • equals

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

      protected boolean canEqual(Object other)
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object