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>
Type Parameters:
O - the type of DatabaseObject to compute the distances in between
P - preprocessor type
All Implemented Interfaces:
DistanceFunction<O,DoubleDistance>, MeasurementFunction<O,DoubleDistance>, PreprocessorClient<P,O>, Parameterizable
Direct Known Subclasses:
KernelBasedLocallyWeightedDistanceFunction, LocallyWeightedDistanceFunction

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

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

Author:
Elke Achtert

Field Summary
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, logger
 
Constructor Summary
protected AbstractLocallyWeightedDistanceFunction()
          Provides an abstract locally weighted distance function.
 
Method Summary
 String getDefaultPreprocessorClassName()
          Returns the name of the default preprocessor.
 String getPreprocessorDescription()
          Returns the description for the preprocessor parameter.
 Class<P> getPreprocessorSuperClass()
          Returns the super class for the preprocessor parameter.
 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.
 List<String> setParameters(List<String> args)
          Calls AbstractParameterizable#setParameters and passes the remaining parameters to the preprocessorHandler.
 String shortDescription()
          Returns the required input pattern.
 
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, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable
 
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, toString, wait, wait, wait
 
Methods inherited from interface de.lmu.ifi.dbs.elki.preprocessing.PreprocessorClient
getAssociationID
 
Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, collectOptions, getParameters
 
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
 

Field Detail

preprocessorHandler

private 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 - Database
verbose - unused
time - unused

setParameters

public List<String> setParameters(List<String> args)
                           throws ParameterException
Calls AbstractParameterizable#setParameters and passes the remaining parameters to the preprocessorHandler.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractParameterizable
Parameters:
args - parameters to set the attributes accordingly to
Returns:
a list containing the unused parameters
Throws:
ParameterException - in case of wrong parameter-setting

shortDescription

public String shortDescription()
Description copied from class: AbstractMeasurementFunction
Returns the required input pattern.

Specified by:
shortDescription in interface Parameterizable
Overrides:
shortDescription in class AbstractMeasurementFunction<O extends RealVector<O,?>,DoubleDistance>
Returns:
Description of the class

getDefaultPreprocessorClassName

public String getDefaultPreprocessorClassName()
Description copied from interface: PreprocessorClient
Returns the name of the default preprocessor.

Specified by:
getDefaultPreprocessorClassName in interface PreprocessorClient<P extends Preprocessor<O>,O extends RealVector<O,?>>
Returns:
the name of the default preprocessor, which is KnnQueryBasedHiCOPreprocessor

getPreprocessorDescription

public String getPreprocessorDescription()
Description copied from interface: PreprocessorClient
Returns the description for the preprocessor parameter.

Specified by:
getPreprocessorDescription in interface PreprocessorClient<P extends Preprocessor<O>,O extends RealVector<O,?>>
Returns:
the description for the preprocessor parameter

getPreprocessorSuperClass

public Class<P> getPreprocessorSuperClass()
Description copied from interface: PreprocessorClient
Returns the super class for the preprocessor parameter.

Specified by:
getPreprocessorSuperClass in interface PreprocessorClient<P extends Preprocessor<O>,O extends RealVector<O,?>>
Returns:
the super class for the preprocessor, which is Preprocessor

Release 0.2.1 (2009-07-13_1605)