public class MinMaxNormalizer extends BaseDoubleTransform
Mathematically: (newMax-newMin)/(max-min) * (x-min) + newMin
| Modifier and Type | Field and Description |
|---|---|
protected double |
max |
protected double |
min |
protected double |
newMax |
protected double |
newMin |
protected double |
ratio |
columnName, columnNumberinputSchema| Constructor and Description |
|---|
MinMaxNormalizer(java.lang.String columnName,
double min,
double max) |
MinMaxNormalizer(java.lang.String columnName,
double min,
double max,
double newMin,
double newMax) |
| Modifier and Type | Method and Description |
|---|---|
ColumnMetaData |
getNewColumnMetaData(java.lang.String newColumnName,
ColumnMetaData oldColumnMeta) |
java.lang.Object |
map(java.lang.Object input)
Transform an object
in to another object
|
Writable |
map(Writable writable) |
java.lang.String |
toString() |
columnName, columnNames, equals, hashCode, map, mapSequence, outputColumnName, outputColumnNames, setInputSchema, transformgetInputSchema, mapSequenceclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetInputSchemaprotected final double min
protected final double max
protected final double newMin
protected final double newMax
protected final double ratio
public MinMaxNormalizer(java.lang.String columnName,
double min,
double max)
public MinMaxNormalizer(java.lang.String columnName,
double min,
double max,
double newMin,
double newMax)
public Writable map(Writable writable)
map in class BaseDoubleTransformpublic ColumnMetaData getNewColumnMetaData(java.lang.String newColumnName, ColumnMetaData oldColumnMeta)
getNewColumnMetaData in class BaseDoubleTransformpublic java.lang.String toString()
toString in class BaseColumnTransformpublic java.lang.Object map(java.lang.Object input)
input - the record to transform