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

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

@Title(value="LoOP: Local Outlier Probabilities")
@Description(value="Variant of the LOF algorithm normalized using statistical values.")
@Reference(authors="H.-P. Kriegel, P. Kr\u00f6ger, E. Schubert, A. Zimek",
           title="LoOP: Local Outlier Probabilities",
           booktitle="Proceedings of the 18th International Conference on Information and Knowledge Management (CIKM), Hong Kong, China, 2009",
           url="http://dx.doi.org/10.1145/1645953.1646195")
public class LoOP<O,D extends NumberDistance<D,?>>
extends AbstractAlgorithm<OutlierResult>
implements OutlierAlgorithm

LoOP: Local Outlier Probabilities Distance/density based algorithm similar to LOF to detect outliers, but with statistical methods to achieve better result stability.


Nested Class Summary
static class LoOP.Parameterizer<O,D extends NumberDistance<D,?>>
          Parameterization class.
 
Field Summary
static OptionID COMPARISON_DISTANCE_FUNCTION_ID
          The distance function to determine the reachability distance between database objects.
protected  DistanceFunction<? super O,D> comparisonDistanceFunction
          Preprocessor Step 2
(package private)  int kcomp
          Holds the value of KCOMP_ID.
static OptionID KCOMP_ID
          Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOOP_SCORE, must be an integer greater than 1.
(package private)  int kreach
          Holds the value of KREACH_ID.
static OptionID KREACH_ID
          Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOOP_SCORE, must be an integer greater than 1.
(package private)  double lambda
          Hold the value of LAMBDA_ID.
static OptionID LAMBDA_ID
          Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOOP_SCORE, must be an integer greater than 1.
private static Logging logger
          The logger for this class.
(package private) static boolean objectIsInKNN
          Include object itself in kNN neighborhood.
static OptionID REACHABILITY_DISTANCE_FUNCTION_ID
          The distance function to determine the reachability distance between database objects.
protected  DistanceFunction<? super O,D> reachabilityDistanceFunction
          Preprocessor Step 1
 
Constructor Summary
LoOP(int kreach, int kcomp, DistanceFunction<? super O,D> reachabilityDistanceFunction, DistanceFunction<? super O,D> comparisonDistanceFunction, double lambda)
          Constructor with parameters.
 
Method Summary
 TypeInformation[] getInputTypeRestriction()
          Get the input type restriction used for negotiating the data query.
protected  Pair<KNNQuery<O,D>,KNNQuery<O,D>> getKNNQueries(Database database, Relation<O> relation, StepProgress stepprog)
          Get the kNN queries for the algorithm.
protected  Logging getLogger()
          Get the (STATIC) logger for this class.
 OutlierResult run(Database database, Relation<O> relation)
          Performs the LoOP algorithm on the given database.
 
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.


REACHABILITY_DISTANCE_FUNCTION_ID

public static final OptionID REACHABILITY_DISTANCE_FUNCTION_ID
The distance function to determine the reachability distance between database objects.


COMPARISON_DISTANCE_FUNCTION_ID

public static final OptionID COMPARISON_DISTANCE_FUNCTION_ID
The distance function to determine the reachability distance between database objects.


KREACH_ID

public static final OptionID KREACH_ID
Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOOP_SCORE, must be an integer greater than 1.


KCOMP_ID

public static final OptionID KCOMP_ID
Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOOP_SCORE, must be an integer greater than 1.


LAMBDA_ID

public static final OptionID LAMBDA_ID
Parameter to specify the number of nearest neighbors of an object to be considered for computing its LOOP_SCORE, must be an integer greater than 1.


kreach

int kreach
Holds the value of KREACH_ID.


kcomp

int kcomp
Holds the value of KCOMP_ID.


lambda

double lambda
Hold the value of LAMBDA_ID.


reachabilityDistanceFunction

protected DistanceFunction<? super O,D extends NumberDistance<D,?>> reachabilityDistanceFunction
Preprocessor Step 1


comparisonDistanceFunction

protected DistanceFunction<? super O,D extends NumberDistance<D,?>> comparisonDistanceFunction
Preprocessor Step 2


objectIsInKNN

static boolean objectIsInKNN
Include object itself in kNN neighborhood.

Constructor Detail

LoOP

public LoOP(int kreach,
            int kcomp,
            DistanceFunction<? super O,D> reachabilityDistanceFunction,
            DistanceFunction<? super O,D> comparisonDistanceFunction,
            double lambda)
Constructor with parameters.

Parameters:
kreach -
kcomp -
reachabilityDistanceFunction -
comparisonDistanceFunction -
lambda -
Method Detail

getKNNQueries

protected Pair<KNNQuery<O,D>,KNNQuery<O,D>> getKNNQueries(Database database,
                                                          Relation<O> relation,
                                                          StepProgress stepprog)
Get the kNN queries for the algorithm.

Parameters:
database - Database
stepprog - Progress logger
Returns:
result

run

public OutlierResult run(Database database,
                         Relation<O> relation)
                  throws IllegalStateException
Performs the LoOP algorithm on the given database.

Throws:
IllegalStateException

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)