|
|
|||||||||||||||||||||
| 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.algorithm.AbstractAlgorithm<O>
de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm<O,D>
de.lmu.ifi.dbs.elki.algorithm.KNNDistanceOrder<O,D>
O - the type of DatabaseObjects handled by this AlgorithmD - the type of Distance used by this Algorithmpublic class KNNDistanceOrder<O extends DatabaseObject,D extends Distance<D>>
Provides an order of the kNN-distances for all objects within the database.
| Field Summary | |
|---|---|
private int |
k
Holds the value of K_PARAM. |
static OptionID |
K_ID
OptionID for K_PARAM |
private IntParameter |
K_PARAM
Parameter to specify the distance of the k-distant object to be assessed, must be an integer greater than 0. |
private double |
percentage
Holds the value of PERCENTAGE_PARAM. |
static OptionID |
PERCENTAGE_ID
OptionID for PERCENTAGE_PARAM |
DoubleParameter |
PERCENTAGE_PARAM
Parameter to specify the average percentage of distances randomly choosen to be provided in the result, must be a double greater than 0 and less than or equal to 1. |
private KNNDistanceOrderResult<O,D> |
result
Holds the result. |
| Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm |
|---|
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM |
| 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 | |
|---|---|
KNNDistanceOrder()
Provides an algorithm to order the kNN-distances for all objects of the database, adding parameters K_PARAM and
PERCENTAGE_PARAM to the option handler
additionally to parameters of super class. |
|
| Method Summary | |
|---|---|
Description |
getDescription()
Returns a description of the algorithm. |
Result<O> |
getResult()
Returns the result of the algorithm. |
protected void |
runInTime(Database<O> database)
The run method encapsulated in measure of runtime. |
String[] |
setParameters(String[] args)
Calls DistanceBasedAlgorithm#setParameters(args)
and sets additionally the values of the parameters
K_PARAM and PERCENTAGE_PARAM. |
| Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm |
|---|
getAttributeSettings, getDistanceFunction |
| Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm |
|---|
description, 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 |
|---|
public static final OptionID K_ID
K_PARAM
private final IntParameter K_PARAM
Default value: 1
Key: -knndistanceorder.k
private int k
K_PARAM.
public static final OptionID PERCENTAGE_ID
PERCENTAGE_PARAM
public final DoubleParameter PERCENTAGE_PARAM
Default value: 1.0
Key: -knndistanceorder.percentage
private double percentage
PERCENTAGE_PARAM.
private KNNDistanceOrderResult<O extends DatabaseObject,D extends Distance<D>> result
| Constructor Detail |
|---|
public KNNDistanceOrder()
K_PARAM and
PERCENTAGE_PARAM to the option handler
additionally to parameters of super class.
| Method Detail |
|---|
protected void runInTime(Database<O> database)
throws IllegalStateException
AbstractAlgorithm
runInTime in class AbstractAlgorithm<O extends DatabaseObject>database - the database to run the algorithm on
IllegalStateException - if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).AbstractAlgorithm.runInTime(de.lmu.ifi.dbs.elki.database.Database)public Result<O> getResult()
Algorithm
Algorithm.getResult()
public String[] setParameters(String[] args)
throws ParameterException
DistanceBasedAlgorithm#setParameters(args)
and sets additionally the values of the parameters
K_PARAM and PERCENTAGE_PARAM.
setParameters in interface ParameterizablesetParameters in class DistanceBasedAlgorithm<O extends DatabaseObject,D extends Distance<D>>args - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-settingParameterizable.setParameters(String[])public Description getDescription()
Algorithm
Algorithm.getDescription()
|
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||||