java.lang.Object
com.pervasive.datarush.analytics.functions.StatsFunctions
Useful statistics related functions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumSupported methods of value normalization. -
Method Summary
Modifier and TypeMethodDescriptionstatic ScalarValuedFunctionminmax(ScalarValuedFunction expr, double min, double max) Create a MinMax normalization function for the given subexpression.static ScalarValuedFunctionminmax(ScalarValuedFunction expr, BigDecimal min, BigDecimal max) Create a MinMax normalization function for the given subexpression.static ScalarValuedFunctionCreate a MinMax normalization function for the input field.static ScalarValuedFunctionminmax(String field, BigDecimal min, BigDecimal max) Create a MinMax normalization function for the input field.static ScalarValuedFunctionnormalizeFunction(StatsFunctions.NormalizeMethod method, ScalarValuedFunction expr, AbstractNumericInfo<?> numInfo) Create a normalization function for the given function expression.static ScalarValuedFunctionnormalizeFunction(StatsFunctions.NormalizeMethod method, String field, AbstractNumericInfo<?> numInfo) Create a normalization function for the given input field.static ScalarValuedFunctionzscore(ScalarValuedFunction expr, double mean, double stddev) Create a Z-Score normalization function for the given input function.static ScalarValuedFunctionzscore(ScalarValuedFunction expr, BigDecimal mean, BigDecimal stddev) Create a Z-Score normalization function for the given input function.static ScalarValuedFunctionCreate a Z-Score normalization function for the input field.static ScalarValuedFunctionzscore(String field, BigDecimal mean, BigDecimal stddev) Create a Z-Score normalization function for the input field.
-
Method Details
-
normalizeFunction
public static ScalarValuedFunction normalizeFunction(StatsFunctions.NormalizeMethod method, String field, AbstractNumericInfo<?> numInfo) Create a normalization function for the given input field.- Parameters:
method- the method to usefield- input field to normalizenumInfo- numerical statistics of the input field- Returns:
- normalization function
-
normalizeFunction
public static ScalarValuedFunction normalizeFunction(StatsFunctions.NormalizeMethod method, ScalarValuedFunction expr, AbstractNumericInfo<?> numInfo) Create a normalization function for the given function expression.- Parameters:
method- the method to useexpr- apply normalization to the result of this functionnumInfo- numerical statistics of the input field- Returns:
- normalization function
-
zscore
Create a Z-Score normalization function for the input field.- Parameters:
field- input field to normalizemean- mean of the input datastddev- standard deviation of the input data- Returns:
- normalization function
-
zscore
Create a Z-Score normalization function for the given input function.- Parameters:
expr- apply normalization to the result of this functionmean- mean of the input datastddev- standard deviation of the input data- Returns:
- normalization function
-
zscore
Create a Z-Score normalization function for the input field.- Parameters:
field- input field to normalizemean- mean of the input datastddev- standard deviation of the input data- Returns:
- normalization function
-
zscore
public static ScalarValuedFunction zscore(ScalarValuedFunction expr, BigDecimal mean, BigDecimal stddev) Create a Z-Score normalization function for the given input function.- Parameters:
expr- apply normalization to the result of this functionmean- mean of the input datastddev- standard deviation of the input data- Returns:
- normalization function
-
minmax
Create a MinMax normalization function for the input field.- Parameters:
field- input field to normalizemin- minimum value of the input datamax- maximum value of the input data- Returns:
- normalization function
-
minmax
Create a MinMax normalization function for the given subexpression.- Parameters:
expr- apply normalization to the result of this functionmin- minimum value of the input datamax- maximum value of the input data- Returns:
- normalization function
-
minmax
Create a MinMax normalization function for the input field.- Parameters:
field- input field to normalizemin- minimum value of the input datamax- maximum value of the input data- Returns:
- normalization function
-
minmax
public static ScalarValuedFunction minmax(ScalarValuedFunction expr, BigDecimal min, BigDecimal max) Create a MinMax normalization function for the given subexpression.- Parameters:
expr- apply normalization to the result of this functionmin- minimum value of the input datamax- maximum value of the input data- Returns:
- normalization function
-