de.lmu.ifi.dbs.elki.algorithm.outlier
Class KNNOutlier<O,D extends NumberDistance<D,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<R>
      extended by de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm<O,D,OutlierResult>
          extended by de.lmu.ifi.dbs.elki.algorithm.outlier.KNNOutlier<O,D>
Type Parameters:
O - the type of DatabaseObjects handled by this Algorithm
D - the type of Distance used by this Algorithm
All Implemented Interfaces:
Algorithm, OutlierAlgorithm, InspectionUtilFrequentlyScanned, Parameterizable

@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.


Nested Class Summary
static class KNNOutlier.Parameterizer<O,D extends NumberDistance<D,?>>
          Parameterization class.
 
Field Summary
private  int k
          The parameter k
static OptionID K_ID
          Parameter to specify the k nearest neighbor
private static Logging logger
          The logger for this class.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm
DISTANCE_FUNCTION_ID
 
Constructor Summary
KNNOutlier(DistanceFunction<? super O,D> distanceFunction, int k)
          Constructor for a single kNN query.
 
Method Summary
 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.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractDistanceBasedAlgorithm
getDistanceFunction
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
makeParameterDistanceFunction, run
 
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.algorithm.outlier.OutlierAlgorithm
run
 

Field Detail

logger

private static final Logging logger
The logger for this class.


K_ID

public static final OptionID K_ID
Parameter to specify the k nearest neighbor


k

private int k
The parameter k

Constructor Detail

KNNOutlier

public KNNOutlier(DistanceFunction<? super O,D> distanceFunction,
                  int k)
Constructor for a single kNN query.

Parameters:
distanceFunction - distance function to use
k - Value of k
Method Detail

run

public OutlierResult run(Database database,
                         Relation<O> relation)
Runs the algorithm in the timed evaluation part.


getInputTypeRestriction

public TypeInformation[] getInputTypeRestriction()
Description copied from class: AbstractAlgorithm
Get the input type restriction used for negotiating the data query.

Specified by:
getInputTypeRestriction in interface Algorithm
Specified by:
getInputTypeRestriction in class AbstractAlgorithm<OutlierResult>
Returns:
Type restriction

getLogger

protected Logging getLogger()
Description copied from class: AbstractAlgorithm
Get the (STATIC) logger for this class.

Specified by:
getLogger in class AbstractAlgorithm<OutlierResult>
Returns:
the static logger

Release 0.4.0 (2011-09-20_1324)