|
|
|||||||||||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.KDDTask<O>
O
- the type of DatabaseObjects handled by this Algorithmpublic class KDDTask<O extends DatabaseObject>
Provides a KDDTask that can be used to perform any algorithm implementing
Algorithm
using any DatabaseConnection implementing
DatabaseConnection
.
Field Summary | |
---|---|
private Algorithm<O> |
algorithm
Holds the algorithm to run. |
private ClassParameter<Algorithm> |
ALGORITHM_PARAM
Parameter to specify the algorithm to be applied, must extend Algorithm . |
private static String |
CALL
The String for calling this class' main routine on command line interface. |
private ClassParameter<DatabaseConnection> |
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 ClassParameter<Parameterizable> |
DESCRIPTION_PARAM
Optional Parameter to specify a class to obtain a description for, must extend Parameterizable . |
private Flag |
HELP_FLAG
Flag to obtain help-message. |
private Flag |
HELP_LONG_FLAG
Flag to obtain help-message. |
private OptionHandler |
helpOptionHandler
|
static String |
INFORMATION
Information for citation and version. |
private boolean |
initialized
Whether KDDTask has been properly initialized for calling the run() -method. |
private static String |
NEWLINE
The newline string according to system. |
private Normalization<O> |
normalization
A normalization - per default no normalization is used. |
private ClassParameter<Normalization> |
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. |
private File |
out
Holds the file to print results to. |
private FileParameter |
OUTPUT_PARAM
Optional Parameter to specify the file to write the obtained results in. |
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 | |
---|---|
KDDTask()
Provides a KDDTask. |
Method Summary | |
---|---|
String |
description()
Returns a description for printing on command line interface. |
List<AttributeSettings> |
getAttributeSettings()
Returns the parameter setting of the attributes. |
static void |
main(String[] args)
Runs a KDD task accordingly to the specified parameters. |
Result<O> |
run()
Method to run the specified algorithm using the specified database connection. |
String[] |
setParameters(String[] args)
Sets the options accordingly to the specified list of parameters. |
String |
usage(String message)
Returns a usage message with the specified message as leading line, and information as provided by optionHandler. |
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 |
Field Detail |
---|
public static final String INFORMATION
private static final String CALL
private static final String NEWLINE
private final Flag HELP_FLAG
Key: -h
private final Flag HELP_LONG_FLAG
Key: -help
private final ClassParameter<Algorithm> ALGORITHM_PARAM
Algorithm
.
Key: -algorithm
private final ClassParameter<Parameterizable> DESCRIPTION_PARAM
Parameterizable
.
Key: -description
private final ClassParameter<DatabaseConnection> DATABASE_CONNECTION_PARAM
DatabaseConnection
.
Key: -dbc
Default value: FileBasedDatabaseConnection
private final FileParameter OUTPUT_PARAM
Key: -out
private final ClassParameter<Normalization> NORMALIZATION_PARAM
Key: -norm
private final Flag NORMALIZATION_UNDO_FLAG
Key: -normUndo
private Algorithm<O extends DatabaseObject> algorithm
private DatabaseConnection<O extends DatabaseObject> databaseConnection
private File out
private boolean initialized
run()
-method.
private Normalization<O extends DatabaseObject> normalization
private boolean normalizationUndo
private OptionHandler helpOptionHandler
Constructor Detail |
---|
public KDDTask()
Method Detail |
---|
public String description()
description
in interface Parameterizable
description
in class AbstractParameterizable
Parameterizable.description()
public String usage(String message)
message
- a message to be include in the usage message
public String[] setParameters(String[] args) throws ParameterException
setParameters
in interface Parameterizable
setParameters
in class AbstractParameterizable
args
- parameters to set the attributes accordingly to
ParameterException
- in case of wrong parameter-settingParameterizable.setParameters(String[])
public List<AttributeSettings> getAttributeSettings()
getAttributeSettings
in interface Parameterizable
getAttributeSettings
in class AbstractParameterizable
Parameterizable.getAttributeSettings()
public Result<O> run() throws IllegalStateException
IllegalStateException
- if initialization has not been done properly (i.e.
setParameters(String[])
has
not been called before calling this method)public static void main(String[] args)
args
- parameter list according to description
|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |