All Superinterfaces:
org.apache.lucene.util.Accountable, NamedWriteable, NamedXContentObject, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject, Writeable
All Known Subinterfaces:
LenientlyParsedPreProcessor, StrictlyParsedPreProcessor
All Known Implementing Classes:
CustomWordEmbedding, FrequencyEncoding, Multi, NGram, OneHotEncoding, TargetMeanEncoding

public interface PreProcessor extends NamedXContentObject, NamedWriteable, org.apache.lucene.util.Accountable
Describes a pre-processor for a defined machine learning model This processor should take a set of fields and return the modified set of fields.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
     

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

    org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params

    Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable

    Writeable.Reader<V>, Writeable.Writer<V>
  • Field Summary

    Fields inherited from interface org.apache.lucene.util.Accountable

    NULL_ACCOUNTABLE

    Fields inherited from interface org.elasticsearch.xcontent.ToXContent

    EMPTY, EMPTY_PARAMS
  • Method Summary

    Modifier and Type
    Method
    Description
     
    The expected input fields
    boolean
     
     
    void
    Process the given fields and their values and return the modified map.
     

    Methods inherited from interface org.apache.lucene.util.Accountable

    getChildResources, ramBytesUsed

    Methods inherited from interface org.elasticsearch.common.io.stream.NamedWriteable

    getWriteableName

    Methods inherited from interface org.elasticsearch.xpack.core.ml.utils.NamedXContentObject

    getName

    Methods inherited from interface org.elasticsearch.xcontent.ToXContent

    toXContent

    Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject

    isFragment

    Methods inherited from interface org.elasticsearch.common.io.stream.Writeable

    writeTo
  • Method Details

    • inputFields

      List<String> inputFields()
      The expected input fields
    • outputFields

      List<String> outputFields()
      Returns:
      The resulting output fields. It is imperative that the order is consistent between calls.
    • process

      void process(Map<String,Object> fields)
      Process the given fields and their values and return the modified map. NOTE: The passed map object is mutated directly
      Parameters:
      fields - The fields and their values to process
    • reverseLookup

      Map<String,String> reverseLookup()
      Returns:
      Reverse lookup map to match resulting features to their original feature name
    • isCustom

      boolean isCustom()
      Returns:
      Is the pre-processor a custom one provided by the user, or automatically created? This changes how feature importance is calculated, as fields generated by custom processors get individual feature importance calculations.
    • getOutputFieldType

      String getOutputFieldType(String outputField)