
O - the type of DatabaseObjects handled by this AlgorithmD - the type of Distance used by this Algorithm@Title(value="KNN-Distance-Order") @Description(value="Assesses the knn distances for a specified k and orders them.") public class KNNDistanceOrder<O,D extends Distance<D>> extends AbstractDistanceBasedAlgorithm<O,D,KNNDistanceOrderResult<D>>
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
KNNDistanceOrder.Parameterizer<O,D extends Distance<D>>
Parameterization class. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
private int | 
k
Holds the value of  
K_ID. | 
static OptionID | 
K_ID
Parameter to specify the distance of the k-distant object to be assessed,
 must be an integer greater than 0. 
 | 
private static Logging | 
LOG
The logger for this class. 
 | 
private double | 
percentage
Holds the value of  
PERCENTAGE_ID. | 
static OptionID | 
PERCENTAGE_ID
Parameter to specify the average percentage of distances randomly chosen to
 be provided in the result, must be a double greater than 0 and less than or
 equal to 1. 
 | 
DISTANCE_FUNCTION_ID| Constructor and Description | 
|---|
KNNDistanceOrder(DistanceFunction<O,D> distanceFunction,
                int k,
                double percentage)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
TypeInformation[] | 
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query. 
 | 
protected Logging | 
getLogger()
Get the (STATIC) logger for this class. 
 | 
KNNDistanceOrderResult<D> | 
run(Database database,
   Relation<O> relation)
Provides an order of the kNN-distances for all objects within the specified
 database. 
 | 
getDistanceFunctionmakeParameterDistanceFunction, runprivate static final Logging LOG
public static final OptionID K_ID
private int k
K_ID.public static final OptionID PERCENTAGE_ID
private double percentage
PERCENTAGE_ID.public KNNDistanceOrder(DistanceFunction<O,D> distanceFunction, int k, double percentage)
distanceFunction - Distance functionk - k Parameterpercentage - percentage parameterpublic KNNDistanceOrderResult<D> run(Database database, Relation<O> relation)
database - Databaserelation - Relationpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<KNNDistanceOrderResult<D extends Distance<D>>>protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<KNNDistanceOrderResult<D extends Distance<D>>>