public class MinMaxScaler extends Object implements Transformer<MinMaxScaler>
MinMaxScaler
transformer range = [0,1].
This transformer takes a subtype of Vector
of values and maps it to a
scaled subtype of Vector
such that each feature lies between a user-specified range.
This transformer can be prepended to all Transformer
and
Predictor
implementations which expect as input a subtype
of Vector
or a LabeledVector
.
Modifier and Type | Class and Description |
---|---|
static class |
MinMaxScaler.Max$ |
static class |
MinMaxScaler.Min$ |
Constructor and Description |
---|
MinMaxScaler() |
Modifier and Type | Method and Description |
---|---|
static MinMaxScaler |
apply() |
static <P extends Predictor<P>> |
chainPredictor(P predictor) |
static <T extends Transformer<T>> |
chainTransformer(T transformer) |
static <Training> void |
fit(DataSet<Training> training,
ParameterMap fitParameters,
FitOperation<Self,Training> fitOperation) |
static <Training> ParameterMap |
fit$default$2() |
static Object |
fitLabeledVectorMinMaxScaler()
Trains the
MinMaxScaler by learning the minimum and maximum of the features of the
training data which is of type LabeledVector . |
static <T extends Vector> |
fitVectorMinMaxScaler()
Trains the
MinMaxScaler by learning the minimum and maximum of each feature of the
training data. |
scala.Option<DataSet<scala.Tuple2<breeze.linalg.Vector<Object>,breeze.linalg.Vector<Object>>>> |
metricsOption() |
static ParameterMap |
parameters() |
MinMaxScaler |
setMax(double max)
Sets the maximum for the range of the transformed data
|
MinMaxScaler |
setMin(double min)
Sets the minimum for the range of the transformed data
|
static <Input,Output> |
transform(DataSet<Input> input,
ParameterMap transformParameters,
TransformDataSetOperation<Self,Input,Output> transformOperation) |
static <Input,Output> |
transform$default$2() |
static Object |
transformLabeledVectors() |
static <T extends Vector> |
transformVectors(BreezeVectorConverter<T> evidence$1,
TypeInformation<T> evidence$2,
scala.reflect.ClassTag<T> evidence$3)
TransformDataSetOperation which scales input data of subtype of Vector with respect to
the calculated minimum and maximum of the training data. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
chainPredictor, chainTransformer, transform
parameters
public static MinMaxScaler apply()
public static <T extends Vector> Object fitVectorMinMaxScaler()
MinMaxScaler
by learning the minimum and maximum of each feature of the
training data. These values are used in the transform step to transform the given input data.
FitOperation
training the MinMaxScaler
on subtypes of Vector
public static Object fitLabeledVectorMinMaxScaler()
MinMaxScaler
by learning the minimum and maximum of the features of the
training data which is of type LabeledVector
. The minimum and maximum are used to
transform the given input data.
public static <T extends Vector> Object transformVectors(BreezeVectorConverter<T> evidence$1, TypeInformation<T> evidence$2, scala.reflect.ClassTag<T> evidence$3)
TransformDataSetOperation
which scales input data of subtype of Vector
with respect to
the calculated minimum and maximum of the training data. The minimum and maximum
values of the resulting data is configurable.
evidence$1
- (undocumented)evidence$2
- (undocumented)evidence$3
- (undocumented)TransformDataSetOperation
scaling subtypes of Vector
such that the feature
values are in the configured rangepublic static Object transformLabeledVectors()
public static ParameterMap parameters()
public static <Training> void fit(DataSet<Training> training, ParameterMap fitParameters, FitOperation<Self,Training> fitOperation)
public static <Training> ParameterMap fit$default$2()
public static <Input,Output> DataSet<Output> transform(DataSet<Input> input, ParameterMap transformParameters, TransformDataSetOperation<Self,Input,Output> transformOperation)
public static <T extends Transformer<T>> ChainedTransformer<Self,T> chainTransformer(T transformer)
public static <P extends Predictor<P>> ChainedPredictor<Self,P> chainPredictor(P predictor)
public static <Input,Output> ParameterMap transform$default$2()
public scala.Option<DataSet<scala.Tuple2<breeze.linalg.Vector<Object>,breeze.linalg.Vector<Object>>>> metricsOption()
public MinMaxScaler setMin(double min)
min
- the user-specified minimum value.public MinMaxScaler setMax(double max)
max
- the user-specified maximum value.Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.