|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.normalization.AbstractNormalization<V>
de.lmu.ifi.dbs.elki.normalization.AttributeWiseVarianceNormalization<V>
V
- vector typepublic class AttributeWiseVarianceNormalization<V extends RealVector<V,?>>
Class to perform and undo a normalization on real vectors with respect to given mean and standard deviation in each dimension.
Field Summary | |
---|---|
private double[] |
mean
Stores the mean in each dimension. |
static OptionID |
MEAN_ID
OptionID for MEAN_PARAM |
private DoubleListParameter |
MEAN_PARAM
Parameter for means. |
private double[] |
stddev
Stores the standard deviation in each dimension. |
static OptionID |
STDDEV_ID
OptionID for STDDEV_PARAM |
private DoubleListParameter |
STDDEV_PARAM
Parameter for stddevs. |
Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
optionHandler |
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debug, logger |
Constructor Summary | |
---|---|
AttributeWiseVarianceNormalization()
Sets mean and stddev parameter to the optionhandler. |
Method Summary | |
---|---|
private void |
determineMeanVariance(List<Pair<V,Associations>> objectAndAssociationsList)
Determines the means and standard deviations in each dimension of the given featureVectors. |
private void |
determineMeanVariance(V[] featureVectors)
Determines the mean and standard deviations in each dimension of the given featureVectors. |
private double |
normalize(int d,
double val)
|
List<V> |
normalize(List<V> featureVectors)
Performs a normalization on a set of feature vectors. |
List<Pair<V,Associations>> |
normalizeObjects(List<Pair<V,Associations>> objectAndAssociationsList)
Performs a normalization on a list of database objects and their associations. |
private double |
restore(int d,
double val)
|
List<V> |
restore(List<V> featureVectors)
Transforms a set of feature vectores to the original attribute ranges. |
V |
restore(V featureVector)
Transforms a feature vector to the original attribute ranges. |
List<String> |
setParameters(List<String> args)
Sets the attributes of the class accordingly to the given parameters. |
String |
toString(String pre)
Returns a string representation of this normalization. |
LinearEquationSystem |
transform(LinearEquationSystem linearEquationSystem)
Transforms a linear equation system describing linear dependencies derived on the normalized space into a linear equation system describing linear dependencies quantitatively adapted to the original space. |
Methods inherited from class de.lmu.ifi.dbs.elki.normalization.AbstractNormalization |
---|
toString |
Methods inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
Field Detail |
---|
public static final OptionID MEAN_ID
MEAN_PARAM
public static final OptionID STDDEV_ID
STDDEV_PARAM
private final DoubleListParameter MEAN_PARAM
private final DoubleListParameter STDDEV_PARAM
private double[] mean
private double[] stddev
Constructor Detail |
---|
public AttributeWiseVarianceNormalization()
Method Detail |
---|
private double normalize(int d, double val)
private double restore(int d, double val)
public List<Pair<V,Associations>> normalizeObjects(List<Pair<V,Associations>> objectAndAssociationsList) throws NonNumericFeaturesException
Normalization
objectAndAssociationsList
- the list of database objects and their associations
NonNumericFeaturesException
- if feature vectors differ in length or values are not
suitable to normalizationpublic List<V> normalize(List<V> featureVectors) throws NonNumericFeaturesException
Normalization
featureVectors
- a set of feature vectors to be normalized
NonNumericFeaturesException
- if feature vectors differ in length or values are not
suitable to normalizationpublic V restore(V featureVector) throws NonNumericFeaturesException
Normalization
featureVector
- a feature vector to be transformed into original space
NonNumericFeaturesException
- feature vector is not compatible with values initialized
during normalizationpublic List<V> restore(List<V> featureVectors) throws NonNumericFeaturesException
Normalization
featureVectors
- a set of feature vectors to be transformed into original space
NonNumericFeaturesException
- if feature vectors differ in length or are not compatible
with values initialized during normalizationpublic LinearEquationSystem transform(LinearEquationSystem linearEquationSystem)
Normalization
linearEquationSystem
- the linear equation system to be transformed
public String toString(String pre)
pre
- the prefix of each new line
public List<String> setParameters(List<String> args) throws ParameterException
setParameters
in interface Parameterizable
setParameters
in class AbstractParameterizable
args
- parameters to set the attributes accordingly to
IllegalArgumentException
- in case of wrong parameter-setting
ParameterException
- in case of wrong parameter-settingprivate void determineMeanVariance(V[] featureVectors)
featureVectors
- the list of feature vectorsprivate void determineMeanVariance(List<Pair<V,Associations>> objectAndAssociationsList)
objectAndAssociationsList
- the list of feature vectors and their
associations
|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |