Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.clustering.correlation
Class COPAA<V extends RealVector<V,?>>

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.algorithm.AbstractAlgorithm<V>
              extended by de.lmu.ifi.dbs.elki.algorithm.clustering.correlation.COPAA<V>
Type Parameters:
V - the type of RealVector handled by this Algorithm
All Implemented Interfaces:
Algorithm<V>, Loggable, Parameterizable
Direct Known Subclasses:
COPAC

public class COPAA<V extends RealVector<V,?>>
extends AbstractAlgorithm<V>

Algorithm to partition a database according to the correlation dimension of its objects and to then perform an arbitrary algorithm over the partitions.

Author:
Elke Achtert

Field Summary
protected  ClassParameter PARTITION_ALGORITHM_PARAM
          Parameter to specify the algorithm to apply to each partition, must extend Algorithm.
private  ClassParameter<Database> PARTITION_DB_PARAM
          Parameter to specify the database class for each partition, must extend Database.
protected  Algorithm<V> partitionAlgorithm
          Holds the partitioning algorithm.
protected  Class<Database<V>> partitionDatabase
          Holds the class of the partition databases.
protected  String[] partitionDatabaseParameters
          Holds the parameters of the partition databases.
protected  HiCOPreprocessor<V> preprocessor
          Holds the preprocessor.
private  ClassParameter<HiCOPreprocessor> PREPROCESSOR_PARAM
          Parameter to specify the preprocessor to derive partition criterion, must extend HiCOPreprocessor.
private  PartitionResults<V> result
          Holds the result.
 
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
COPAA()
          Sets the specific parameters additionally to the parameters set by the super-class.
 
Method Summary
 String description()
          Returns a description of the class and the required parameters.
 List<AttributeSettings> getAttributeSettings()
          Returns the parameter setting of the attributes.
 Description getDescription()
          Returns a description of the algorithm.
 Algorithm<V> getPartitionAlgorithm()
          Returns the the partitioning algorithm.
 Result<V> getResult()
          Returns the result of the algorithm.
protected  void runInTime(Database<V> database)
          The run method encapsulated in measure of runtime.
protected  PartitionResults<V> runPartitionAlgorithm(Database<V> database, Map<Integer,List<Integer>> partitionMap)
          Runs the partition algorithm and creates the result.
 String[] setParameters(String[] args)
          Passes remaining parameters first to the partition algorithm, then to the preprocessor.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setTime, setVerbose
 
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.utilities.optionhandling.Parameterizable
checkGlobalParameterConstraints, getParameters, getPossibleOptions, inlineDescription
 

Field Detail

PREPROCESSOR_PARAM

private final ClassParameter<HiCOPreprocessor> PREPROCESSOR_PARAM
Parameter to specify the preprocessor to derive partition criterion, must extend HiCOPreprocessor.

Key: -copaa.preprocessor


PARTITION_ALGORITHM_PARAM

protected final ClassParameter PARTITION_ALGORITHM_PARAM
Parameter to specify the algorithm to apply to each partition, must extend Algorithm.

Key: -copaa.partitionAlgorithm


PARTITION_DB_PARAM

private final ClassParameter<Database> PARTITION_DB_PARAM
Parameter to specify the database class for each partition, must extend Database.

Key: -copaa.partitionDB


preprocessor

protected HiCOPreprocessor<V extends RealVector<V,?>> preprocessor
Holds the preprocessor.


partitionAlgorithm

protected Algorithm<V extends RealVector<V,?>> partitionAlgorithm
Holds the partitioning algorithm.


partitionDatabase

protected Class<Database<V extends RealVector<V,?>>> partitionDatabase
Holds the class of the partition databases.


partitionDatabaseParameters

protected String[] partitionDatabaseParameters
Holds the parameters of the partition databases.


result

private PartitionResults<V extends RealVector<V,?>> result
Holds the result.

Constructor Detail

COPAA

public COPAA()
Sets the specific parameters additionally to the parameters set by the super-class.

Method Detail

runInTime

protected void runInTime(Database<V> database)
                  throws IllegalStateException
Description copied from class: AbstractAlgorithm
The run method encapsulated in measure of runtime. An extending class needs not to take care of runtime itself.

Specified by:
runInTime in class AbstractAlgorithm<V extends RealVector<V,?>>
Parameters:
database - the database to run the algorithm on
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).
See Also:
Algorithm.run(de.lmu.ifi.dbs.elki.database.Database)

getResult

public Result<V> getResult()
Description copied from interface: Algorithm
Returns the result of the algorithm.

Returns:
the result of the algorithm
See Also:
Algorithm.getResult()

getDescription

public Description getDescription()
Description copied from interface: Algorithm
Returns a description of the algorithm.

Returns:
a description of the algorithm
See Also:
Algorithm.getDescription()

getPartitionAlgorithm

public Algorithm<V> getPartitionAlgorithm()
Returns the the partitioning algorithm.

Returns:
the the partitioning algorithm

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 AbstractAlgorithm<V extends RealVector<V,?>>
Returns:
String a description of the class and the required parameters
See Also:
Parameterizable.description()

setParameters

public String[] setParameters(String[] args)
                       throws ParameterException
Passes remaining parameters first to the partition algorithm, then to the preprocessor.

Specified by:
setParameters in interface Parameterizable
Overrides:
setParameters in class AbstractAlgorithm<V extends RealVector<V,?>>
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()
Returns the parameter setting of the attributes.

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

runPartitionAlgorithm

protected PartitionResults<V> runPartitionAlgorithm(Database<V> database,
                                                    Map<Integer,List<Integer>> partitionMap)
Runs the partition algorithm and creates the result.

Parameters:
database - the database to run this algorithm on
partitionMap - the map of partition IDs to object ids
Returns:
the result of the partition algorithm

Release 0.1 (2008-07-10_1838)