Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.normalization
Class MultiRepresentedObjectNormalization<O extends DatabaseObject>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
          extended by de.lmu.ifi.dbs.elki.normalization.AbstractNormalization<MultiRepresentedObject<O>>
              extended by de.lmu.ifi.dbs.elki.normalization.MultiRepresentedObjectNormalization<O>
All Implemented Interfaces:
Loggable, Normalization<MultiRepresentedObject<O>>, Parameterizable

public class MultiRepresentedObjectNormalization<O extends DatabaseObject>
extends AbstractNormalization<MultiRepresentedObject<O>>

Class to perform and undo a normalization on multi-represented objects with respect to given normalizations for each representation.

Author:
Elke Achtert

Field Summary
static String DEFAULT_NORMALIZATION
          Default normalization.
static String NO_NORMALIZATION
          Keyword for no normalization.
static String NORMALIZATION_D
          Description of parameter parser.
static String NORMALIZATION_P
          Label for parameter normalizations.
private  List<Normalization<O>> normalizations
          The normalizations for each representation.
static Pattern SPLIT
          A pattern defining a comma.
 
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
MultiRepresentedObjectNormalization()
          Sets normalization parameter to the optionhandler.
 
Method Summary
 List<AttributeSettings> getAttributeSettings()
          Returns the setting of the attributes of the algorithm.
 List<MultiRepresentedObject<O>> normalize(List<MultiRepresentedObject<O>> featureVectors)
          Performs a normalization on a set of feature vectors.
 List<ObjectAndAssociations<MultiRepresentedObject<O>>> normalizeObjects(List<ObjectAndAssociations<MultiRepresentedObject<O>>> objectAndAssociationsList)
          Performs a normalization on a list of database objects and their associations.
 List<MultiRepresentedObject<O>> restore(List<MultiRepresentedObject<O>> featureVectors)
          Transforms a set of feature vectores to the original attribute ranges.
 MultiRepresentedObject<O> restore(MultiRepresentedObject<O> 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.
 
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, 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, description, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

DEFAULT_NORMALIZATION

public static final String DEFAULT_NORMALIZATION
Default normalization.


NO_NORMALIZATION

public static final String NO_NORMALIZATION
Keyword for no normalization.

See Also:
Constant Field Values

NORMALIZATION_P

public static final String NORMALIZATION_P
Label for parameter normalizations.

See Also:
Constant Field Values

NORMALIZATION_D

public static final String NORMALIZATION_D
Description of parameter parser.


SPLIT

public static final Pattern SPLIT
A pattern defining a comma.


normalizations

private List<Normalization<O extends DatabaseObject>> normalizations
The normalizations for each representation.

Constructor Detail

MultiRepresentedObjectNormalization

public MultiRepresentedObjectNormalization()
Sets normalization parameter to the optionhandler.

Method Detail

normalizeObjects

public List<ObjectAndAssociations<MultiRepresentedObject<O>>> normalizeObjects(List<ObjectAndAssociations<MultiRepresentedObject<O>>> objectAndAssociationsList)
                                                                                               throws NonNumericFeaturesException
Performs a normalization on a list of database objects and their associations.

Parameters:
objectAndAssociationsList - the list of database objects and their associations
Returns:
a list of normalized database objects and their associations corresponding to the given list
Throws:
NonNumericFeaturesException - if feature vectors differ in length or values are not suitable to normalization

normalize

public List<MultiRepresentedObject<O>> normalize(List<MultiRepresentedObject<O>> featureVectors)
                                                                 throws NonNumericFeaturesException
Description copied from interface: Normalization
Performs a normalization on a set of feature vectors.

Parameters:
featureVectors - a set of feature vectors to be normalized
Returns:
a set of normalized feature vectors corresponding to the given feature vectors but being different objects
Throws:
NonNumericFeaturesException - if feature vectors differ in length or values are not suitable to normalization
See Also:
Normalization.normalize(java.util.List)

restore

public List<MultiRepresentedObject<O>> restore(List<MultiRepresentedObject<O>> featureVectors)
                                                               throws NonNumericFeaturesException
Transforms a set of feature vectores to the original attribute ranges.

Parameters:
featureVectors - a set of feature vectors to be transformed into original space
Returns:
a set of feature vectors transformed into original space corresponding to the given feature vectors
Throws:
NonNumericFeaturesException - if feature vectors differ in length or are not compatible with values initialized during normalization

restore

public MultiRepresentedObject<O> restore(MultiRepresentedObject<O> featureVector)
                                                         throws NonNumericFeaturesException
Transforms a feature vector to the original attribute ranges.

Parameters:
featureVector - a feature vector to be transformed into original space
Returns:
a feature vector transformed into original space corresponding to the given feature vector
Throws:
NonNumericFeaturesException - feature vector is not compatible with values initialized during normalization

transform

public LinearEquationSystem transform(LinearEquationSystem linearEquationSystem)
                               throws NonNumericFeaturesException
Description copied from interface: Normalization
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.

Parameters:
linearEquationSystem - the linear equation system to be transformed
Returns:
a linear equation system describing linear dependencies derived on the normalized space transformed into a linear equation system describing linear dependencies quantitatively adapted to the original space
Throws:
UnsupportedOperationException
NonNumericFeaturesException - if specified linear equation system is not compatible with values initialized during normalization
See Also:
Normalization.transform(de.lmu.ifi.dbs.elki.math.linearalgebra.LinearEquationSystem)

toString

public String toString(String pre)
Returns a string representation of this normalization. The specified prefix pre will be the prefix of each new line. This method is used to write the parameters of a normalization to a result of an algorithm using this normalization.

Parameters:
pre - the prefix of each new line
Returns:
a string representation of this normalization

getAttributeSettings

public List<AttributeSettings> getAttributeSettings()
Returns the setting of the attributes of the algorithm.

Specified by:
getAttributeSettings in interface Parameterizable
Overrides:
getAttributeSettings in class AbstractParameterizable
Returns:
the setting of the attributes of the algorithm
See Also:
Parameterizable.getAttributeSettings()

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Sets the attributes of the class accordingly to the given parameters. Returns a new String array containing those entries of the given array that are neither expected nor used by this Parameterizable.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractParameterizable
Parameters:
args - parameters to set the attributes accordingly to
Returns:
String[] an array containing the unused parameters
Throws:
IllegalArgumentException - in case of wrong parameter-setting
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

Release 0.1 (2008-07-10_1838)