|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.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.AttributeWiseRealVectorNormalization<V>
public class AttributeWiseRealVectorNormalization<V extends RealVector<V,?>>
Class to perform and undo a normalization on real vectors with respect to given minimum and maximum in each dimension.
Field Summary | |
---|---|
private double[] |
maxima
Stores the maximum in each dimension. |
static String |
MAXIMA_D
Description for parameter minima. |
static String |
MAXIMA_P
Parameter for maxima. |
private double[] |
minima
Stores the minimum in each dimension. |
static String |
MINIMA_D
Description for parameter minima. |
static String |
MINIMA_P
Parameter for minima. |
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 |
Constructor Summary | |
---|---|
AttributeWiseRealVectorNormalization()
Sets minima and maxima parameter to the optionhandler. |
Method Summary | |
---|---|
String |
description()
Returns a description of the class and the required parameters. |
private void |
determineMinMax(List<ObjectAndAssociations<V>> objectAndAssociationsList)
Determines the minima and maxima values in each dimension of the given featureVectors. |
private void |
determineMinMax(V[] featureVectors)
Determines the minima and maxima values in each dimension of the given featureVectors. |
private double |
factor(int dimension)
Returns a factor for normalization in a certain dimension. |
List<AttributeSettings> |
getAttributeSettings()
Returns the settings of all options assigned to the option handler. |
private void |
initMinMax(int dimensionality)
Initializes the min and max array. |
List<V> |
normalize(List<V> featureVectors)
Performs a normalization on a set of feature vectors. |
List<ObjectAndAssociations<V>> |
normalizeObjects(List<ObjectAndAssociations<V>> objectAndAssociationsList)
Performs a normalization on a list of database objects and their associations. |
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. |
String[] |
setParameters(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. |
private void |
updateMinMax(V featureVector)
Updates the min and max array according to the specified feature vector. |
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, checkGlobalParameterConstraints, deleteOption, description, description, getParameters, getParameterValue, getPossibleOptions, inlineDescription, isSet, setParameters |
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
---|
debugFine, debugFiner, debugFinest, exception, message, progress, progress, progress, verbose, 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, getParameters, getPossibleOptions, inlineDescription |
Field Detail |
---|
public static final String MINIMA_P
public static final String MINIMA_D
public static final String MAXIMA_P
public static final String MAXIMA_D
private double[] maxima
private double[] minima
Constructor Detail |
---|
public AttributeWiseRealVectorNormalization()
Method Detail |
---|
public List<ObjectAndAssociations<V>> normalizeObjects(List<ObjectAndAssociations<V>> 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 normalizationNormalization.normalizeObjects(java.util.List)
public 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 normalizationNormalization.normalize(java.util.List)
public 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 normalizationNormalization.restore(de.lmu.ifi.dbs.elki.data.DatabaseObject)
public 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 normalizationNormalization.restore(java.util.List)
public LinearEquationSystem transform(LinearEquationSystem linearEquationSystem) throws NonNumericFeaturesException
Normalization
linearEquationSystem
- the linear equation system to be transformed
NonNumericFeaturesException
- if specified linear equation system is not compatible
with values initialized during normalizationNormalization.transform(de.lmu.ifi.dbs.elki.math.linearalgebra.LinearEquationSystem)
public String toString(String pre)
pre
- the prefix of each new line
public String description()
description
in interface Parameterizable
description
in class AbstractParameterizable
Parameterizable.description()
public String[] setParameters(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-settingParameterizable.setParameters(String[])
public List<AttributeSettings> getAttributeSettings()
AbstractParameterizable
getAttributeSettings
in interface Parameterizable
getAttributeSettings
in class AbstractParameterizable
Parameterizable.getAttributeSettings()
private double factor(int dimension)
dimension
- the dimension to get a factor for normalization
private void determineMinMax(V[] featureVectors)
featureVectors
- the list of feature vectorsprivate void determineMinMax(List<ObjectAndAssociations<V>> objectAndAssociationsList)
objectAndAssociationsList
- the list of feature vectors and their associtionsprivate void initMinMax(int dimensionality)
dimensionality
- the dimensionality of the feature vectors to be normalizedprivate void updateMinMax(V featureVector)
featureVector
- the feature vector
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |