O
- the type of objects processed by this algorithm@Title(value="KNNDD: k-Nearest Neighbor Data Description") @Reference(authors="D. de Ridder, D. M. J. Tax, R. P. W. Duin", title="An experimental comparison of one-class classification methods", booktitle="Proc. 4th Ann. Conf. Advanced School for Computing and Imaging (ASCI\'98)", url="http://prlab.tudelft.nl/sites/default/files/asci_98.pdf", bibkey="conf/asci/deRidderTD98") public class KNNDD<O> extends AbstractDistanceBasedAlgorithm<O,OutlierResult> implements OutlierAlgorithm
A variation inbetween of KNN outlier and LOF, comparing the nearest neighbor distance of a point to the nearest neighbor distance of the nearest neighbor.
The initial description used k=1, where this equation makes most sense. For k > 1, one may want to use averaging similar to LOF.
Reference ("1-Nearest-Neighbor method"):
D. de Ridder, D. M. J. Tax, R. P. W. Duin
An experimental comparison of one-class classification methods
Proc. 4th Ann. Conf. Advanced School for Computing and Imaging (ASCI'98)
Modifier and Type | Class and Description |
---|---|
static class |
KNNDD.Parameterizer<O>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
private int |
k
The parameter k (including query point!)
|
private static Logging |
LOG
The logger for this class.
|
ALGORITHM_ID
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
KNNDD(DistanceFunction<? super O> distanceFunction,
int k)
Constructor for a single kNN query.
|
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.
|
OutlierResult |
run(Database database,
Relation<O> relation)
Runs the algorithm in the timed evaluation part.
|
OutlierResult |
run(Relation<O> relation)
Runs the algorithm in the timed evaluation part.
|
getDistanceFunction
run
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
run
private static final Logging LOG
private int k
public KNNDD(DistanceFunction<? super O> distanceFunction, int k)
distanceFunction
- distance function to usek
- Value of k (excluding query point!)public OutlierResult run(Database database, Relation<O> relation)
database
- Database (no longer used)relation
- Data relationpublic OutlierResult run(Relation<O> relation)
relation
- Data relationpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<OutlierResult>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<OutlierResult>
Copyright © 2019 ELKI Development Team. License information.