public class MinMaxScaler extends Estimator<MinMaxScalerModel>
Rescaled(e_i) = \frac{e_i - E_{min}}{E_{max} - E_{min}} * (max - min) + min
For the case E_{max} == E_{min}, Rescaled(e_i) = 0.5 * (max + min) Note that since zero values will probably be transformed to non-zero values, output of the transformer will be DenseVector even for sparse input.
| Constructor and Description |
|---|
MinMaxScaler() |
MinMaxScaler(java.lang.String uid) |
| Modifier and Type | Method and Description |
|---|---|
MinMaxScaler |
copy(ParamMap extra)
Creates a copy of this instance with the same UID and some extra params.
|
MinMaxScalerModel |
fit(DataFrame dataset)
Fits a model to the input data.
|
double |
getMax() |
double |
getMin() |
static MinMaxScaler |
load(java.lang.String path) |
DoubleParam |
max()
upper bound after transformation, shared by all features
Default: 1.0
|
DoubleParam |
min()
lower bound after transformation, shared by all features
Default: 0.0
|
MinMaxScaler |
setInputCol(java.lang.String value) |
MinMaxScaler |
setMax(double value) |
MinMaxScaler |
setMin(double value) |
MinMaxScaler |
setOutputCol(java.lang.String value) |
StructType |
transformSchema(StructType schema)
:: DeveloperApi ::
|
java.lang.String |
uid()
An immutable unique ID for the object and its derivatives.
|
StructType |
validateAndTransformSchema(StructType schema)
Validates and transforms the input schema.
|
void |
validateParams() |
transformSchemaclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclear, copyValues, defaultCopy, defaultParamMap, explainParam, explainParams, extractParamMap, extractParamMap, get, getDefault, getOrDefault, getParam, hasDefault, hasParam, isDefined, isSet, paramMap, params, set, set, set, setDefault, setDefault, shouldOwntoStringinitializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarningpublic MinMaxScaler(java.lang.String uid)
public MinMaxScaler()
public static MinMaxScaler load(java.lang.String path)
public java.lang.String uid()
Identifiableuid in interface Identifiablepublic MinMaxScaler setInputCol(java.lang.String value)
public MinMaxScaler setOutputCol(java.lang.String value)
public MinMaxScaler setMin(double value)
public MinMaxScaler setMax(double value)
public MinMaxScalerModel fit(DataFrame dataset)
Estimatorfit in class Estimator<MinMaxScalerModel>dataset - (undocumented)public StructType transformSchema(StructType schema)
PipelineStageDerives the output schema from the input schema.
transformSchema in class PipelineStageschema - (undocumented)public MinMaxScaler copy(ParamMap extra)
Paramscopy in interface Paramscopy in class Estimator<MinMaxScalerModel>extra - (undocumented)defaultCopy()public DoubleParam min()
public double getMin()
public DoubleParam max()
public double getMax()
public StructType validateAndTransformSchema(StructType schema)
public void validateParams()
validateParams in interface Params