at.tuwien.ifs.somtoolbox.data.normalisation
Class StandardScoreNormaliser
java.lang.Object
at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData
at.tuwien.ifs.somtoolbox.data.SOMLibSparseInputData
at.tuwien.ifs.somtoolbox.data.normalisation.AbstractNormaliser
at.tuwien.ifs.somtoolbox.data.normalisation.StandardScoreNormaliser
- All Implemented Interfaces:
- InputData
public class StandardScoreNormaliser
- extends AbstractNormaliser
Standard score nomalisation, normalises the attributes to have zero mean and the standard deviation as max values,
i.e. z = (x - x_mean) / standardDevition.
FIXME: the computation gives slightly different results than trying in Excel...
- Version:
- $Id: StandardScoreNormaliser.java 3583 2010-05-21 10:07:41Z mayer $
- Author:
- Rudolf Mayer
Fields inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData |
classInfo, contentType, dataNames, dim, ERROR_MESSAGE_FILE_FORMAT_CORRUPT, featureMatrixCols, featureMatrixRows, isNormalized, meanVector, mqe0, nameCache, numVectors, rand, source, templateVector |
Method Summary |
void |
postReading()
|
void |
preReading()
|
protected void |
processLine(int index,
java.lang.String[] lineElements)
Process a single line of the input vector file. |
Methods inherited from class at.tuwien.ifs.somtoolbox.data.SOMLibSparseInputData |
addInstance, getDataAsMatrix, getDimensionality, getInputDatum, getInputVector, getValue, init, initDataStructures, initMatrix, main, mqe0, openFile, parse, parseDouble, readVectorFile, setLabel, setMatrixValue, subset |
Methods inherited from class at.tuwien.ifs.somtoolbox.data.AbstractSOMLibSparseInputData |
classInformation, create, dim, equals, getByNameDistanceSorted, getContentType, getData, getData, getDataIntervals, getDataSource, getDistanceMatrix, getDistances, getFeatureDensities, getFeatureMatrixColumns, getFeatureMatrixRows, getFileNameSuffix, getFormatName, getInputDatum, getInputDatum, getInputDatumIndex, getLabel, getLabels, getMaxValue, getMeanVector, getMeanVector, getMinValue, getNearestDistances, getNearestN, getNearestN, getNearestNUnsorted, getRandomInputDatum, initDistanceMatrix, isNormalizedToUnitLength, numVectors, setClassInfo, setTemplateVector, templateVector, transformValues |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sums
double[] sums
means
double[] means
standardDeviation
double[] standardDeviation
StandardScoreNormaliser
public StandardScoreNormaliser()
preReading
public void preReading()
- Specified by:
preReading
in class AbstractNormaliser
postReading
public void postReading()
throws java.io.IOException
- Specified by:
postReading
in class AbstractNormaliser
- Throws:
java.io.IOException
processLine
protected void processLine(int index,
java.lang.String[] lineElements)
throws java.lang.Exception
- Description copied from class:
SOMLibSparseInputData
- Process a single line of the input vector file.
- Overrides:
processLine
in class SOMLibSparseInputData
- Parameters:
index
- the line indexlineElements
- the line elements, split by the delimeters
- Throws:
java.lang.Exception