Module org.elasticsearch.xcore
Class Regression
java.lang.Object
org.elasticsearch.xpack.core.ml.dataframe.analyses.Regression
- All Implemented Interfaces:
NamedWriteable,Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject,DataFrameAnalysis
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xpack.core.ml.dataframe.analyses.DataFrameAnalysis
DataFrameAnalysis.FieldInfoNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionRegression(String dependentVariable) Regression(String dependentVariable, BoostedTreeParams boostedTreeParams, String predictionFieldName, Double trainingPercent, Long randomizeSeed, Regression.LossFunction lossFunction, Double lossFunctionParameter, List<PreProcessor> featureProcessors, Boolean earlyStoppingEnabled) -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic StringextractJobIdFromStateDoc(String stateDocId) static RegressionfromXContent(org.elasticsearch.xcontent.XContentParser parser, boolean ignoreUnknownFields) getAllowedCategoricalTypes(String fieldName) getParams(DataFrameAnalysis.FieldInfo fieldInfo) Returns the progress phases the analysis goes through in orderlonggetResultMappings(String resultsFieldName, FieldCapabilitiesResponse fieldCapabilitiesResponse) Returns fields for which the mappings should be either predefined or copied from source index to destination index.getStateDocIdPrefix(String jobId) Returns the document id prefix for the analysis statedoubleinthashCode()inferenceConfig(DataFrameAnalysis.FieldInfo fieldInfo) booleanbooleanbooleanbooleanorg.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME
public static final org.elasticsearch.xcontent.ParseField NAME -
DEPENDENT_VARIABLE
public static final org.elasticsearch.xcontent.ParseField DEPENDENT_VARIABLE -
PREDICTION_FIELD_NAME
public static final org.elasticsearch.xcontent.ParseField PREDICTION_FIELD_NAME -
TRAINING_PERCENT
public static final org.elasticsearch.xcontent.ParseField TRAINING_PERCENT -
RANDOMIZE_SEED
public static final org.elasticsearch.xcontent.ParseField RANDOMIZE_SEED -
LOSS_FUNCTION
public static final org.elasticsearch.xcontent.ParseField LOSS_FUNCTION -
LOSS_FUNCTION_PARAMETER
public static final org.elasticsearch.xcontent.ParseField LOSS_FUNCTION_PARAMETER -
FEATURE_PROCESSORS
public static final org.elasticsearch.xcontent.ParseField FEATURE_PROCESSORS -
EARLY_STOPPING_ENABLED
public static final org.elasticsearch.xcontent.ParseField EARLY_STOPPING_ENABLED
-
-
Constructor Details
-
Regression
public Regression(String dependentVariable, BoostedTreeParams boostedTreeParams, @Nullable String predictionFieldName, @Nullable Double trainingPercent, @Nullable Long randomizeSeed, @Nullable Regression.LossFunction lossFunction, @Nullable Double lossFunctionParameter, @Nullable List<PreProcessor> featureProcessors, @Nullable Boolean earlyStoppingEnabled) -
Regression
-
Regression
- Throws:
IOException
-
-
Method Details
-
fromXContent
public static Regression fromXContent(org.elasticsearch.xcontent.XContentParser parser, boolean ignoreUnknownFields) -
getDependentVariable
-
getBoostedTreeParams
-
getPredictionFieldName
-
getTrainingPercent
public double getTrainingPercent()- Specified by:
getTrainingPercentin interfaceDataFrameAnalysis- Returns:
- the percentage of data to use for training
-
getRandomizeSeed
public long getRandomizeSeed() -
getLossFunction
-
getLossFunctionParameter
-
getFeatureProcessors
-
getEarlyStoppingEnabled
-
getWriteableName
- Specified by:
getWriteableNamein interfaceNamedWriteable
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
getParams
- Specified by:
getParamsin interfaceDataFrameAnalysis- Parameters:
fieldInfo- Information about the fields like types and cardinalities- Returns:
- The analysis parameters as a map
-
supportsCategoricalFields
public boolean supportsCategoricalFields()- Specified by:
supportsCategoricalFieldsin interfaceDataFrameAnalysis- Returns:
trueif this analysis supports fields with categorical values (i.e. text, keyword, ip)
-
getAllowedCategoricalTypes
- Specified by:
getAllowedCategoricalTypesin interfaceDataFrameAnalysis- Parameters:
fieldName- field for which the allowed categorical types should be returned- Returns:
- The types treated as categorical for the given field
-
getRequiredFields
- Specified by:
getRequiredFieldsin interfaceDataFrameAnalysis- Returns:
- The names and types of the fields that analyzed documents must have for the analysis to operate
-
getFieldCardinalityConstraints
- Specified by:
getFieldCardinalityConstraintsin interfaceDataFrameAnalysis- Returns:
Listcontaining cardinality constraints for the selected (analysis-specific) fields
-
getResultMappings
public Map<String,Object> getResultMappings(String resultsFieldName, FieldCapabilitiesResponse fieldCapabilitiesResponse) Description copied from interface:DataFrameAnalysisReturns fields for which the mappings should be either predefined or copied from source index to destination index.- Specified by:
getResultMappingsin interfaceDataFrameAnalysis- Parameters:
resultsFieldName- name of the results field under which all the results are storedfieldCapabilitiesResponse- field capabilities fetched for this analysis' required fields- Returns:
Mapcontaining fields for which the mappings should be handled explicitly
-
supportsMissingValues
public boolean supportsMissingValues()- Specified by:
supportsMissingValuesin interfaceDataFrameAnalysis- Returns:
trueif this analysis supports data frame rows with missing values
-
persistsState
public boolean persistsState()- Specified by:
persistsStatein interfaceDataFrameAnalysis- Returns:
trueif this analysis persists state that can later be used to restore from a given point
-
getStateDocIdPrefix
Description copied from interface:DataFrameAnalysisReturns the document id prefix for the analysis state- Specified by:
getStateDocIdPrefixin interfaceDataFrameAnalysis
-
getProgressPhases
Description copied from interface:DataFrameAnalysisReturns the progress phases the analysis goes through in order- Specified by:
getProgressPhasesin interfaceDataFrameAnalysis
-
inferenceConfig
- Specified by:
inferenceConfigin interfaceDataFrameAnalysis- Returns:
- the analysis inference config or
nullif inference is not supported
-
supportsInference
public boolean supportsInference()- Specified by:
supportsInferencein interfaceDataFrameAnalysis- Returns:
trueif this analysis trains a model that can be used for inference
-
extractJobIdFromStateDoc
-
equals
-
hashCode
public int hashCode()
-