Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

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

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,R>
          extended by de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm<O,DoubleDistance,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<O,OutlierResult>, 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 extends DatabaseObject,D extends DoubleDistance>
extends DistanceBasedAlgorithm<O,DoubleDistance,OutlierResult>

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.

Author:
Lisa Reichert

Field Summary
private  int k
          Holds the value of K_PARAM.
static OptionID K_ID
          OptionID for K_PARAM
private  IntParameter K_PARAM
          Parameter to specify the k nearest neighbor, Key: -knno.k
static AssociationID<Double> KNNO_KNNDISTANCE
          The association id to associate the KNNO_KNNDISTANCE of an object for the KNN outlier detection algorithm.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
KNNOutlier(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected  OutlierResult runInTime(Database<O> database)
          Runs the algorithm in the timed evaluation part.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm
getDistanceFactory, getDistanceFunction
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setTime, setVerbose
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KNNO_KNNDISTANCE

public static final AssociationID<Double> KNNO_KNNDISTANCE
The association id to associate the KNNO_KNNDISTANCE of an object for the KNN outlier detection algorithm.


K_ID

public static final OptionID K_ID
OptionID for K_PARAM


K_PARAM

private final IntParameter K_PARAM
Parameter to specify the k nearest neighbor,

Key: -knno.k


k

private int k
Holds the value of K_PARAM.

Constructor Detail

KNNOutlier

public KNNOutlier(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

runInTime

protected OutlierResult runInTime(Database<O> database)
                           throws IllegalStateException
Runs the algorithm in the timed evaluation part.

Specified by:
runInTime in class AbstractAlgorithm<O extends DatabaseObject,OutlierResult>
Parameters:
database - the database to run the algorithm on
Returns:
the Result computed by this algorithm
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).

Release 0.3 (2010-03-31_1612)