public class ScalingOperation extends java.lang.Object implements DatasetOperation
Constructor and Description |
---|
ScalingOperation()
Initializes a new ScalingOperation.
|
ScalingOperation(double mean,
double std)
Creates a new ScalingOperation with the specified mean and standard deviation.
|
Modifier and Type | Method and Description |
---|---|
double |
getMean()
Returns the mean value used in normalization.
|
java.util.Map<java.lang.String,java.lang.Object> |
getObjectMap()
Creates a map of the important fields for the instance, suitable for serialization.
|
long |
getSerializationVersion()
Returns the current version of the serialization format.
|
double |
getStd()
Returns the standard deviation used in normalization.
|
int |
getVersion()
Returns the current class version.
|
void |
initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
Initializes an instance with a current-version object graph.
|
Dataset |
run(Dataset input)
Scales an input Dataset
|
void |
setMean(double mean)
Sets the mean value used in normalization.
|
void |
setStd(double std)
Sets the standard deviation used in normalization.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
init, initPreviousVersion, initUnknownVersion, load, read, save, write
public ScalingOperation(double mean, double std)
mean
- meanstd
- standard deviationpublic ScalingOperation()
public Dataset run(Dataset input)
run
in interface DatasetOperation
input
- Dataset on which to operatepublic double getMean()
public void setMean(double mean)
mean
- mean valuepublic double getStd()
public void setStd(double std)
std
- standard deviation.public long getSerializationVersion()
ObjectMap
getSerializationVersion
in interface ObjectMap
public int getVersion()
ObjectMap
getVersion
in interface ObjectMap
public java.util.Map<java.lang.String,java.lang.Object> getObjectMap()
ObjectMap
getObjectMap
in interface ObjectMap
public void initCurrentVersion(java.util.Map<java.lang.String,java.lang.Object> objectMap)
ObjectMap
initCurrentVersion
in interface ObjectMap
objectMap
- object graph for initialization