Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.KDDTask<O>
Type Parameters:
O - the type of DatabaseObjects handled by this Algorithm
All Implemented Interfaces:
Parameterizable

public class KDDTask<O extends DatabaseObject>
extends AbstractLoggable
implements Parameterizable

Provides a KDDTask that can be used to perform any algorithm implementing Algorithm using any DatabaseConnection implementing DatabaseConnection.

Author:
Arthur Zimek

Field Summary
private  Algorithm<O,Result> algorithm
          Holds the algorithm to run.
private  ObjectParameter<Algorithm<O,Result>> ALGORITHM_PARAM
          Parameter to specify the algorithm to be applied, must extend Algorithm.
private  ObjectParameter<DatabaseConnection<O>> DATABASE_CONNECTION_PARAM
          Parameter to specify the database connection to be used, must extend DatabaseConnection.
private  DatabaseConnection<O> databaseConnection
          Holds the database connection to have the algorithm run with.
private  Normalization<O> normalization
          A normalization - per default no normalization is used.
private  ObjectParameter<Normalization<O>> NORMALIZATION_PARAM
          Optional Parameter to specify a normalization in order to use a database with normalized values.
private  Flag NORMALIZATION_UNDO_FLAG
          Flag to revert result to original values - invalid option if no normalization has been performed.
private  boolean normalizationUndo
          Whether to undo normalization for result.
(package private)  MultiResult result
          Store the result.
private  ObjectParameter<ResultHandler<O,Result>> RESULT_HANDLER_PARAM
          Parameter to specify the result handler to be used, must extend ResultHandler.
private  ResultHandler<O,Result> resulthandler
          Output handler.
private  Collection<Pair<Object,Parameter<?,?>>> settings
          The settings used, for settings reporting.
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
KDDTask(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
 MultiResult getResult()
          Get the algorithms result.
static void main(String[] args)
          Runs a KDD task accordingly to the specified parameters.
 void run()
          Method to run the specified algorithm using the specified database connection.
 
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
 

Field Detail

ALGORITHM_PARAM

private final ObjectParameter<Algorithm<O extends DatabaseObject,Result>> ALGORITHM_PARAM
Parameter to specify the algorithm to be applied, must extend Algorithm.

Key: -algorithm


DATABASE_CONNECTION_PARAM

private final ObjectParameter<DatabaseConnection<O extends DatabaseObject>> DATABASE_CONNECTION_PARAM
Parameter to specify the database connection to be used, must extend DatabaseConnection.

Key: -dbc

Default value: FileBasedDatabaseConnection


NORMALIZATION_PARAM

private final ObjectParameter<Normalization<O extends DatabaseObject>> NORMALIZATION_PARAM
Optional Parameter to specify a normalization in order to use a database with normalized values.

Key: -norm


NORMALIZATION_UNDO_FLAG

private final Flag NORMALIZATION_UNDO_FLAG
Flag to revert result to original values - invalid option if no normalization has been performed.

Key: -normUndo


RESULT_HANDLER_PARAM

private final ObjectParameter<ResultHandler<O extends DatabaseObject,Result>> RESULT_HANDLER_PARAM
Parameter to specify the result handler to be used, must extend ResultHandler.

Key: -resulthandler

Default value: ResultWriter


algorithm

private Algorithm<O extends DatabaseObject,Result> algorithm
Holds the algorithm to run.


databaseConnection

private DatabaseConnection<O extends DatabaseObject> databaseConnection
Holds the database connection to have the algorithm run with.


normalization

private Normalization<O extends DatabaseObject> normalization
A normalization - per default no normalization is used.


normalizationUndo

private boolean normalizationUndo
Whether to undo normalization for result.


resulthandler

private ResultHandler<O extends DatabaseObject,Result> resulthandler
Output handler.


result

MultiResult result
Store the result.


settings

private Collection<Pair<Object,Parameter<?,?>>> settings
The settings used, for settings reporting.

Constructor Detail

KDDTask

public KDDTask(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

run

public void run()
         throws IllegalStateException
Method to run the specified algorithm using the specified database connection.

Throws:
IllegalStateException - on execution errors

getResult

public MultiResult getResult()
Get the algorithms result.

Returns:
the result

main

public static void main(String[] args)
Runs a KDD task accordingly to the specified parameters.

Parameters:
args - parameter list according to description

Release 0.3 (2010-03-31_1612)