
O - the type of DatabaseObjects handled by this AlgorithmD - the type of Distance used by this Algorithm@Title(value="KNN outlier: Efficient Algorithms for Mining Outliers from Large Data Sets") @Description(value="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. of the Int. Conf. on Management of Data, Dallas, Texas, 2000", url="http://dx.doi.org/10.1145/342009.335437") public class KNNOutlier<O,D extends NumberDistance<D,?>> extends AbstractDistanceBasedAlgorithm<O,D,OutlierResult> implements OutlierAlgorithm
Outlier Detection based on the distance of an object to its k nearest neighbor.
 Reference:
 S. Ramaswamy, R. Rastogi, K. Shim: Efficient Algorithms for Mining Outliers
 from Large Data Sets. In: Proc. of the Int. Conf. on Management of Data,
 Dallas, Texas, 2000.
 
| Modifier and Type | Class and Description | 
|---|---|
| static class  | KNNOutlier.Parameterizer<O,D extends NumberDistance<D,?>>Parameterization class. | 
| Modifier and Type | Field and Description | 
|---|---|
| private int | kThe parameter k | 
| static OptionID | K_IDParameter to specify the k nearest neighbor | 
| private static Logging | LOGThe logger for this class. | 
DISTANCE_FUNCTION_ID| Constructor and Description | 
|---|
| KNNOutlier(DistanceFunction<? super O,D> 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. | 
getDistanceFunctionmakeParameterDistanceFunction, runclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunprivate static final Logging LOG
public static final OptionID K_ID
private int k
public KNNOutlier(DistanceFunction<? super O,D> distanceFunction, int k)
distanceFunction - distance function to usek - Value of kpublic OutlierResult run(Database database, Relation<O> relation)
public TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<OutlierResult>protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<OutlierResult>