Package deepnetts.data.norm
Class MaxScaler
java.lang.Object
deepnetts.data.norm.AbstractScaler
deepnetts.data.norm.MaxScaler
- All Implemented Interfaces:
Serializable
,javax.visrec.ml.data.preprocessing.Scaler<javax.visrec.ml.data.DataSet<MLDataItem>>
Performs max normalization, rescales data to corresponding max value in each column.
Scales all values to interval [0, 1], by dividing columns with their corresponding maximum value.
Performs normalization on both inputs and outputs.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMaxScaler
(javax.visrec.ml.data.DataSet<MLDataItem> dataSet) Creates a new instance of max normalizer initialized to max values in given data set. -
Method Summary
Modifier and TypeMethodDescriptionvoid
apply
(javax.visrec.ml.data.DataSet<MLDataItem> dataSet) Performs normalization on the given inputs.void
deNormalizeInputs
(TensorBase inputs) void
deNormalizeOutputs
(TensorBase outputs) De-normalize given output vector in-place.void
normalizeInput
(TensorBase input) void
scaleInput
(TensorBase input) Normalize input of deployed modelvoid
setMaxInputs
(TensorBase maxInputs) void
setMaxOutputs
(TensorBase maxOutputs)
-
Constructor Details
-
MaxScaler
Creates a new instance of max normalizer initialized to max values in given data set.- Parameters:
dataSet
-
-
-
Method Details
-
apply
Performs normalization on the given inputs.- Parameters:
dataSet
- data set to normalize
-
scaleInput
Description copied from class:AbstractScaler
Normalize input of deployed model- Specified by:
scaleInput
in classAbstractScaler
- Parameters:
input
-
-
getMaxInputs
-
setMaxInputs
-
getMaxOutputs
-
setMaxOutputs
-
deNormalizeOutputs
De-normalize given output vector in-place. Multiplies given vector with vector used for normalization, and stores these values in same memory location as input vector.- Parameters:
outputs
-
-
deNormalizeInputs
-
normalizeInput
-