public class ZScore extends Object implements TrainableNormaliser, Denormaliser
This implementation includes an optional regularisation parameter that is added to the variance before the division.
Constructor and Description |
---|
ZScore()
Construct without regularisation.
|
ZScore(double eps)
Construct with regularisation.
|
Modifier and Type | Method and Description |
---|---|
double[] |
denormalise(double[] vector)
Deormalise the vector.
|
double[][] |
denormalise(double[][] data)
Denormalise the data.
|
double[] |
normalise(double[] vector)
Normalise the vector.
|
double[][] |
normalise(double[][] data)
Normalise the data.
|
void |
train(double[][] data)
Train the normaliser.
|
public ZScore()
public ZScore(double eps)
eps
- the variance normalisation regulariser (each dimension is
divided by sqrt(var + eps).public void train(double[][] data)
TrainableNormaliser
Normaliser.normalise(double[])
or Normaliser.normalise(double[][])
methods.train
in interface TrainableNormaliser
data
- the data to normalise.public double[] normalise(double[] vector)
Normaliser
normalise
in interface Normaliser
vector
- the vectorpublic double[][] normalise(double[][] data)
Normaliser
normalise
in interface Normaliser
data
- the data (one vector per row)public double[] denormalise(double[] vector)
Denormaliser
denormalise
in interface Denormaliser
vector
- the normalised vectorpublic double[][] denormalise(double[][] data)
Denormaliser
denormalise
in interface Denormaliser
data
- the normalised data (one normalised vector per row)