All Superinterfaces:
NamedWriteable, org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject, Writeable
All Known Implementing Classes:
Classification, OutlierDetection, Regression

public interface DataFrameAnalysis extends org.elasticsearch.xcontent.ToXContentObject, NamedWriteable
  • Method Details

    • getParams

      Parameters:
      fieldInfo - Information about the fields like types and cardinalities
      Returns:
      The analysis parameters as a map
    • supportsCategoricalFields

      boolean supportsCategoricalFields()
      Returns:
      true if this analysis supports fields with categorical values (i.e. text, keyword, ip)
    • getAllowedCategoricalTypes

      Set<String> getAllowedCategoricalTypes(String fieldName)
      Parameters:
      fieldName - field for which the allowed categorical types should be returned
      Returns:
      The types treated as categorical for the given field
    • getRequiredFields

      List<RequiredField> getRequiredFields()
      Returns:
      The names and types of the fields that analyzed documents must have for the analysis to operate
    • getFieldCardinalityConstraints

      List<FieldCardinalityConstraint> getFieldCardinalityConstraints()
      Returns:
      List containing cardinality constraints for the selected (analysis-specific) fields
    • getResultMappings

      Map<String,Object> getResultMappings(String resultsFieldName, FieldCapabilitiesResponse fieldCapabilitiesResponse)
      Returns fields for which the mappings should be either predefined or copied from source index to destination index.
      Parameters:
      resultsFieldName - name of the results field under which all the results are stored
      fieldCapabilitiesResponse - field capabilities fetched for this analysis' required fields
      Returns:
      Map containing fields for which the mappings should be handled explicitly
    • supportsMissingValues

      boolean supportsMissingValues()
      Returns:
      true if this analysis supports data frame rows with missing values
    • persistsState

      boolean persistsState()
      Returns:
      true if this analysis persists state that can later be used to restore from a given point
    • getStateDocIdPrefix

      String getStateDocIdPrefix(String jobId)
      Returns the document id prefix for the analysis state
    • getProgressPhases

      List<String> getProgressPhases()
      Returns the progress phases the analysis goes through in order
    • inferenceConfig

      @Nullable InferenceConfig inferenceConfig(DataFrameAnalysis.FieldInfo fieldInfo)
      Returns:
      the analysis inference config or null if inference is not supported
    • supportsInference

      boolean supportsInference()
      Returns:
      true if this analysis trains a model that can be used for inference
    • getTrainingPercent

      default double getTrainingPercent()
      Returns:
      the percentage of data to use for training