Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.distance.distancefunction
Class AbstractLocallyWeightedDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>>

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.distance.AbstractMeasurementFunction<O,D>
              extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction<O,DoubleDistance>
                  extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction<O>
                      extended by de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractLocallyWeightedDistanceFunction<O,P>
All Implemented Interfaces:
DistanceFunction<O,DoubleDistance>, MeasurementFunction<O,DoubleDistance>, Loggable, Parameterizable
Direct Known Subclasses:
KernelBasedLocallyWeightedDistanceFunction, LocallyWeightedDistanceFunction

public abstract class AbstractLocallyWeightedDistanceFunction<O extends RealVector<O,?>,P extends Preprocessor<O>>
extends AbstractDoubleDistanceFunction<O>

Abstract super class for locally weighted distance functions using a preprocessor to compute the local weight matrix.

Author:
Elke Achtert

Field Summary
static String DEFAULT_PREPROCESSOR_CLASS
          The default preprocessor class name.
static String PREPROCESSOR_CLASS_D
          Description for parameter preprocessor.
private  PreprocessorHandler<O,P> preprocessorHandler
          The handler class for the preprocessor.
 
Fields inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
INFINITY_PATTERN
 
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
protected AbstractLocallyWeightedDistanceFunction()
          Provides an abstract locally weighted distance function.
 
Method Summary
 String description()
          Returns a description of the class and the required parameters.
(package private) abstract  AssociationID getAssociationID()
          Returns the assocoiation ID for the association to be set by the preprocessor.
 List<AttributeSettings> getAttributeSettings()
          Returns the settings of all options assigned to the option handler.
 void setDatabase(Database<O> database, boolean verbose, boolean time)
          Set the database that holds the associations for the DatabaseObject for which the measurements should be computed.
 String[] setParameters(String[] args)
          Sets the attributes of the class accordingly to the given parameters.
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDoubleDistanceFunction
infiniteDistance, nullDistance, undefinedDistance, valueOf
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.distancefunction.AbstractDistanceFunction
distance, distance, isInfiniteDistance, isNullDistance, isUndefinedDistance
 
Methods inherited from class de.lmu.ifi.dbs.elki.distance.AbstractMeasurementFunction
getDatabase, matches, requiredInputPattern, setRequiredInputPattern
 
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, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.distancefunction.DistanceFunction
distance
 
Methods inherited from interface de.lmu.ifi.dbs.elki.distance.MeasurementFunction
requiredInputPattern
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

DEFAULT_PREPROCESSOR_CLASS

public static final String DEFAULT_PREPROCESSOR_CLASS
The default preprocessor class name.


PREPROCESSOR_CLASS_D

public static final String PREPROCESSOR_CLASS_D
Description for parameter preprocessor.


preprocessorHandler

private final PreprocessorHandler<O extends RealVector<O,?>,P extends Preprocessor<O>> preprocessorHandler
The handler class for the preprocessor.

Constructor Detail

AbstractLocallyWeightedDistanceFunction

protected AbstractLocallyWeightedDistanceFunction()
Provides an abstract locally weighted distance function.

Method Detail

setDatabase

public void setDatabase(Database<O> database,
                        boolean verbose,
                        boolean time)
Description copied from interface: MeasurementFunction
Set the database that holds the associations for the DatabaseObject for which the measurements should be computed.

Specified by:
setDatabase in interface MeasurementFunction<O extends RealVector<O,?>,DoubleDistance>
Overrides:
setDatabase in class AbstractMeasurementFunction<O extends RealVector<O,?>,DoubleDistance>
Parameters:
database - the database to be set
verbose - flag to allow verbose messages while performing the method
time - flag to request output of performance time
See Also:
MeasurementFunction.setDatabase(de.lmu.ifi.dbs.elki.database.Database, boolean, boolean)

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Description copied from interface: Parameterizable
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:
ParameterException - in case of wrong parameter-setting
See Also:
Parameterizable.setParameters(String[])

getAttributeSettings

public List<AttributeSettings> getAttributeSettings()
Description copied from class: AbstractParameterizable
Returns the settings of all options assigned to the option handler.

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

description

public String description()
Description copied from interface: Parameterizable
Returns a description of the class and the required parameters.

This description should be suitable for a usage description as for a standalone application.

Specified by:
description in interface Parameterizable
Overrides:
description in class AbstractParameterizable
Returns:
String a description of the class and the required parameters
See Also:
Parameterizable.description()

getAssociationID

abstract AssociationID getAssociationID()
Returns the assocoiation ID for the association to be set by the preprocessor.


Release 0.1 (2008-07-10_1838)