- java.lang.Object
-
- com.pervasive.datarush.analytics.stats.NormalizeDescriptor
-
- All Implemented Interfaces:
Serializable
public final class NormalizeDescriptor extends Object implements Serializable
Describes a field to be normalized.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description NormalizeDescriptor(String fieldName, StatsFunctions.NormalizeMethod method)
Construct a normalization descriptor.NormalizeDescriptor(String inputFieldName, StatsFunctions.NormalizeMethod method, String outputFieldName)
Construct a normalization descriptor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NormalizeDescriptor[]
descriptors(StatsFunctions.NormalizeMethod method, String... fieldNames)
Build descriptors for the given fields and method.static NormalizeDescriptor[]
descriptors(StatsFunctions.NormalizeMethod method, Collection<String> reservedNames, String... fieldNames)
String
getInputFieldName()
Get the input field name of the descriptor.StatsFunctions.NormalizeMethod
getMethod()
Get the normalization method of the descriptor.String
getOutputFieldName()
Get the output field name of the descriptor.NormalizeDescriptor
renameOutputField(String name)
Creates a NormalizeDescriptor that is identical to this one except that the output field has a different name.
-
-
-
Constructor Detail
-
NormalizeDescriptor
public NormalizeDescriptor(String fieldName, StatsFunctions.NormalizeMethod method)
Construct a normalization descriptor.- Parameters:
fieldName
- name of the field to normalizemethod
- type of normalization to apply
-
NormalizeDescriptor
public NormalizeDescriptor(String inputFieldName, StatsFunctions.NormalizeMethod method, String outputFieldName)
Construct a normalization descriptor.- Parameters:
inputFieldName
- name of the field to normalizemethod
- type of normalization to applyoutputFieldName
- name of the resultant field
-
-
Method Detail
-
getInputFieldName
public String getInputFieldName()
Get the input field name of the descriptor.- Returns:
- input field name
-
getOutputFieldName
public String getOutputFieldName()
Get the output field name of the descriptor.- Returns:
- output field name
-
getMethod
public StatsFunctions.NormalizeMethod getMethod()
Get the normalization method of the descriptor.- Returns:
- normalizaton method
-
descriptors
public static NormalizeDescriptor[] descriptors(StatsFunctions.NormalizeMethod method, String... fieldNames)
Build descriptors for the given fields and method.- Parameters:
method
- the normalization method to applyfieldNames
- names of the input fields- Returns:
- descriptors for the given fields
-
descriptors
public static NormalizeDescriptor[] descriptors(StatsFunctions.NormalizeMethod method, Collection<String> reservedNames, String... fieldNames)
-
renameOutputField
public NormalizeDescriptor renameOutputField(String name)
Creates a NormalizeDescriptor that is identical to this one except that the output field has a different name.- Parameters:
name
- the name of the output field.- Returns:
- a NormalizeDescriptor with the same input field and normalization method and the provided output field name.
-
-