Package elki.outlier.distance
Class KNNOutlier<O>
- java.lang.Object
-
- elki.outlier.distance.KNNOutlier<O>
-
- Type Parameters:
O
- the type of objects handled by this algorithm
- All Implemented Interfaces:
Algorithm
,OutlierAlgorithm
@Title("KNN outlier: Efficient Algorithms for Mining Outliers from Large Data Sets") @Description("Outlier Detection based on the distance of an object to its k nearest neighbor.") @Reference(authors="S. Ramaswamy, R. Rastogi, K. Shim", title="Efficient Algorithms for Mining Outliers from Large Data Sets", booktitle="Proc. Int. Conf. on Management of Data (SIGMOD 2000)", url="https://doi.org/10.1145/342009.335437", bibkey="DBLP:conf/sigmod/RamaswamyRS00") @Alias("knno") @Priority(200) public class KNNOutlier<O> extends java.lang.Object implements OutlierAlgorithm
Outlier Detection based on the distance of an object to its k nearest neighbor.This implementation differs from the original pseudocode: the k nearest neighbors do not exclude the point that is currently evaluated. I.e. for k=1 the resulting score is the distance to the 1-nearest neighbor that is not the query point and therefore should match k=2 in the exact pseudocode - a value of k=1 in the original code does not make sense, as the 1NN distance will be 0 for every point in the database. If you for any reason want to use the original algorithm, subtract 1 from the k parameter.
Reference:
S. Ramaswamy, R. Rastogi, K. Shim
Efficient Algorithms for Mining Outliers from Large Data Sets.
In: Proc. Int. Conf. on Management of Data (SIGMOD 2000)- Since:
- 0.3
- Author:
- Lisa Reichert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KNNOutlier.Par<O>
Parameterization class.-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Constructor Summary
Constructors Constructor Description KNNOutlier(Distance<? super O> distance, int k)
Constructor for a single kNN query.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.OutlierResult
run(Relation<O> relation)
Runs the algorithm in the timed evaluation part.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.outlier.OutlierAlgorithm
autorun
-
-
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:Algorithm
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceAlgorithm
- Returns:
- Type restriction
-
run
public OutlierResult run(Relation<O> relation)
Runs the algorithm in the timed evaluation part.- Parameters:
relation
- Data relation
-
-