java.lang.Object
org.elasticsearch.client.ml.inference.preprocessing.OneHotEncoding
All Implemented Interfaces:
NamedXContentObject, PreProcessor, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class OneHotEncoding
extends java.lang.Object
implements PreProcessor
PreProcessor for one hot encoding a set of categorical values for a given field.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  OneHotEncoding.Builder  

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type Field Description
    static org.elasticsearch.common.ParseField CUSTOM  
    static org.elasticsearch.common.ParseField FIELD  
    static org.elasticsearch.common.ParseField HOT_MAP  
    static java.lang.String NAME  
    static org.elasticsearch.common.xcontent.ConstructingObjectParser<OneHotEncoding,​java.lang.Void> PARSER  

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Method Summary

    Modifier and Type Method Description
    static OneHotEncoding.Builder builder​(java.lang.String field)  
    boolean equals​(java.lang.Object o)  
    static OneHotEncoding fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)  
    java.lang.Boolean getCustom()  
    java.lang.String getField()  
    java.util.Map<java.lang.String,​java.lang.String> getHotMap()  
    java.lang.String getName()  
    int hashCode()  
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject

    isFragment
  • Field Details

    • NAME

      public static final java.lang.String NAME
      See Also:
      Constant Field Values
    • FIELD

      public static final org.elasticsearch.common.ParseField FIELD
    • HOT_MAP

      public static final org.elasticsearch.common.ParseField HOT_MAP
    • CUSTOM

      public static final org.elasticsearch.common.ParseField CUSTOM
    • PARSER

      public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<OneHotEncoding,​java.lang.Void> PARSER
  • Method Details

    • fromXContent

      public static OneHotEncoding fromXContent​(org.elasticsearch.common.xcontent.XContentParser parser)
    • getField

      public java.lang.String getField()
      Returns:
      Field name on which to one hot encode
    • getHotMap

      public java.util.Map<java.lang.String,​java.lang.String> getHotMap()
      Returns:
      Map of Value: ColumnName for the one hot encoding
    • getName

      public java.lang.String getName()
      Specified by:
      getName in interface NamedXContentObject
      Specified by:
      getName in interface PreProcessor
      Returns:
      The name of the pre-processor
    • getCustom

      public java.lang.Boolean getCustom()
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • hashCode

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

      public static OneHotEncoding.Builder builder​(java.lang.String field)