All Superinterfaces:
org.apache.lucene.util.Accountable, NamedWriteable, NamedXContentObject, ToXContent, 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.
  • 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)