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)
TrainableNormaliserNormaliser.normalise(double[]) or Normaliser.normalise(double[][]) methods.train in interface TrainableNormaliserdata - the data to normalise.public double[] normalise(double[] vector)
Normalisernormalise in interface Normaliservector - the vectorpublic double[][] normalise(double[][] data)
Normalisernormalise in interface Normaliserdata - the data (one vector per row)public double[] denormalise(double[] vector)
Denormaliserdenormalise in interface Denormaliservector - the normalised vectorpublic double[][] denormalise(double[][] data)
Denormaliserdenormalise in interface Denormaliserdata - the normalised data (one normalised vector per row)