org.encog.ml.data.versatile.normalizers
Class IndexedNormalizer
- java.lang.Object
-
- org.encog.ml.data.versatile.normalizers.IndexedNormalizer
-
- All Implemented Interfaces:
- java.io.Serializable, Normalizer
public class IndexedNormalizer extends java.lang.Object implements Normalizer
Normalize ordinal/nominal values to a single value that is simply the index of the class in the list. For example, "one", "two", "three" normalizes to 0,1,2.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description IndexedNormalizer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description java.lang.StringdenormalizeColumn(ColumnDefinition colDef, MLData data, int dataColumn)Denormalize a value.booleanequals(java.lang.Object obj)intnormalizeColumn(ColumnDefinition colDef, double value, double[] outputData, int outputColumn)Normalize a column from a double.intnormalizeColumn(ColumnDefinition colDef, java.lang.String value, double[] outputData, int outputColumn)Normalize a column from a string.intoutputSize(ColumnDefinition colDef)Determine the normalized size of the specified column.
-
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
outputSize
public int outputSize(ColumnDefinition colDef)
Determine the normalized size of the specified column.- Specified by:
outputSizein interfaceNormalizer- Parameters:
colDef- The column to check.- Returns:
- The size of the column normalized.
-
normalizeColumn
public int normalizeColumn(ColumnDefinition colDef, java.lang.String value, double[] outputData, int outputColumn)
Normalize a column from a string. The output will go to an array, starting at outputColumn.- Specified by:
normalizeColumnin interfaceNormalizer- Parameters:
colDef- The column that is being normalized.value- The value to normalize.outputData- The array to output to.outputColumn- The index to start at in outputData.- Returns:
- The new index (in outputData) that we've moved to.
-
denormalizeColumn
public java.lang.String denormalizeColumn(ColumnDefinition colDef, MLData data, int dataColumn)
Denormalize a value.- Specified by:
denormalizeColumnin interfaceNormalizer- Parameters:
colDef- The column to denormalize.data- The data to denormalize.dataColumn- The starting location inside data.- Returns:
- The denormalized value.
-
normalizeColumn
public int normalizeColumn(ColumnDefinition colDef, double value, double[] outputData, int outputColumn)
Normalize a column from a double. The output will go to an array, starting at outputColumn.- Specified by:
normalizeColumnin interfaceNormalizer- Parameters:
colDef- The column that is being normalized.value- The value to normalize.outputData- The array to output to.outputColumn- The index to start at in outputData.- Returns:
- The new index (in outputData) that we've moved to.
-
-
DMelt 3.0 © DataMelt by jWork.ORG