Package elki.outlier.lof
Class OnlineLOF<O>
- java.lang.Object
-
- elki.outlier.lof.FlexibleLOF<O>
-
- elki.outlier.lof.OnlineLOF<O>
-
- All Implemented Interfaces:
Algorithm
,OutlierAlgorithm
public class OnlineLOF<O> extends FlexibleLOF<O>
Incremental version of theLOF
Algorithm, supports insertions and removals.- Since:
- 0.4.0
- Author:
- Elke Achtert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
OnlineLOF.LOFKNNListener
Encapsulates a listener for changes of kNNs used in the online LOF algorithm.static class
OnlineLOF.Par<O>
Parameterization class.-
Nested classes/interfaces inherited from class elki.outlier.lof.FlexibleLOF
FlexibleLOF.LOFResult<O>
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description private static Logging
LOG
The logger for this class.-
Fields inherited from class elki.outlier.lof.FlexibleLOF
kreach, krefer, reachabilityDistance, referenceDistance
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private Pair<Pair<KNNSearcher<DBIDRef>,KNNSearcher<DBIDRef>>,Pair<RKNNSearcher<DBIDRef>,RKNNSearcher<DBIDRef>>>
getKNNAndRkNNQueries(Relation<O> relation, StepProgress stepprog)
Get the kNN and rkNN queries for the algorithm.OutlierResult
run(Relation<O> relation)
Performs the Generalized LOF_SCORE algorithm on the given database by calling#doRunInTime(Database)
and adds aOnlineLOF.LOFKNNListener
to the preprocessors.-
Methods inherited from class elki.outlier.lof.FlexibleLOF
computeLOFs, computeLRDs, doRunInTime, getInputTypeRestriction
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.outlier.OutlierAlgorithm
autorun
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
The logger for this class.
-
-
Constructor Detail
-
OnlineLOF
public OnlineLOF(int krefer, int kreach, Distance<? super O> neighborhoodDistance, Distance<? super O> reachabilityDistance)
Constructor.- Parameters:
krefer
- The number of neighbors for referencekreach
- The number of neighbors for reachability distanceneighborhoodDistance
- the neighborhood distance functionreachabilityDistance
- 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 aOnlineLOF.LOFKNNListener
to the preprocessors.- Overrides:
run
in classFlexibleLOF<O>
- Parameters:
relation
- Data to process- Returns:
- LOF outlier result
-
getKNNAndRkNNQueries
private Pair<Pair<KNNSearcher<DBIDRef>,KNNSearcher<DBIDRef>>,Pair<RKNNSearcher<DBIDRef>,RKNNSearcher<DBIDRef>>> getKNNAndRkNNQueries(Relation<O> relation, StepProgress stepprog)
Get the kNN and rkNN queries for the algorithm.- Parameters:
relation
- Datastepprog
- Progress logger- Returns:
- the kNN and rkNN queries
-
-