de.lmu.ifi.dbs.elki.algorithm.outlier
Class OnlineLOF<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.LOF<O,D>
          extended by de.lmu.ifi.dbs.elki.algorithm.outlier.OnlineLOF<O,D>
All Implemented Interfaces:
Algorithm, OutlierAlgorithm, InspectionUtilFrequentlyScanned, Parameterizable

public class OnlineLOF<O,D extends NumberDistance<D,?>>
extends LOF<O,D>

Incremental version of the LOF Algorithm, supports insertions and removals.


Nested Class Summary
private  class OnlineLOF.LOFKNNListener
          Encapsulates a listener for changes of kNNs used in the online LOF algorithm.
static class OnlineLOF.Parameterizer<O,D extends NumberDistance<D,?>>
          Parameterization class.
 
Nested classes/interfaces inherited from class de.lmu.ifi.dbs.elki.algorithm.outlier.LOF
LOF.LOFResult<O,D extends NumberDistance<D,?>>
 
Field Summary
(package private) static Logging logger
          The logger for this class.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.outlier.LOF
k, K_ID, neighborhoodDistanceFunction, REACHABILITY_DISTANCE_FUNCTION_ID, reachabilityDistanceFunction
 
Constructor Summary
OnlineLOF(int k, DistanceFunction<? super O,D> neighborhoodDistanceFunction, DistanceFunction<? super O,D> reachabilityDistanceFunction)
          Constructor.
 
Method Summary
private  Pair<Pair<KNNQuery<O,D>,KNNQuery<O,D>>,Pair<RKNNQuery<O,D>,RKNNQuery<O,D>>> getKNNAndRkNNQueries(Relation<O> relation, StepProgress stepprog)
          Get the kNN and rkNN queries for the algorithm.
protected  Logging getLogger()
          Get the (STATIC) logger for this class.
 OutlierResult run(Relation<O> relation)
          Performs the Generalized LOF_SCORE algorithm on the given database by calling #doRunInTime(Database) and adds a OnlineLOF.LOFKNNListener to the preprocessors.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.outlier.LOF
computeLOFs, computeLRDs, doRunInTime, getInputTypeRestriction
 
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

static final Logging logger
The logger for this class.

Constructor Detail

OnlineLOF

public OnlineLOF(int k,
                 DistanceFunction<? super O,D> neighborhoodDistanceFunction,
                 DistanceFunction<? super O,D> reachabilityDistanceFunction)
Constructor.

Parameters:
k - the value of k
neighborhoodDistanceFunction - the neighborhood distance function
reachabilityDistanceFunction - the reachability distance function
Method Detail

run

public OutlierResult run(Relation<O> relation)
Performs the Generalized LOF_SCORE algorithm on the given database by calling #doRunInTime(Database) and adds a OnlineLOF.LOFKNNListener to the preprocessors.

Overrides:
run in class LOF<O,D extends NumberDistance<D,?>>
Parameters:
relation - Data to process

getKNNAndRkNNQueries

private Pair<Pair<KNNQuery<O,D>,KNNQuery<O,D>>,Pair<RKNNQuery<O,D>,RKNNQuery<O,D>>> getKNNAndRkNNQueries(Relation<O> relation,
                                                                                                         StepProgress stepprog)
Get the kNN and rkNN queries for the algorithm.

Parameters:
relation - Data
stepprog - Progress logger
Returns:
the kNN and rkNN queries

getLogger

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

Overrides:
getLogger in class LOF<O,D extends NumberDistance<D,?>>
Returns:
the static logger

Release 0.4.0 (2011-09-20_1324)