Package elki.outlier.lof
Class LOF<O>
- java.lang.Object
-
- elki.outlier.lof.LOF<O>
-
- Type Parameters:
O
- the type of data objects handled by this algorithm
- All Implemented Interfaces:
Algorithm
,OutlierAlgorithm
@Title("LOF: Local Outlier Factor") @Description("Algorithm to compute density-based local outlier factors in a database based on the neighborhood size parameter \'k\'") @Reference(authors="Markus M. Breunig, Hans-Peter Kriegel, Raymond Ng, J\u00f6rg Sander", title="LOF: Identifying Density-Based Local Outliers", booktitle="Proc. 2nd ACM SIGMOD Int. Conf. on Management of Data (SIGMOD\'00)", url="https://doi.org/10.1145/342009.335388", bibkey="DBLP:conf/sigmod/BreunigKNS00") @Priority(200) public class LOF<O> extends java.lang.Object implements OutlierAlgorithm
Algorithm to compute density-based local outlier factors in a database based on a specified parameter-lof.k
.The original LOF parameter was called "minPts", but for consistency within ELKI we have renamed this parameter to "k".
Compatibility note: as of ELKI 0.7.0, we no longer include the query point, for consistency with other methods.
Reference:
Markus M. Breunig, Hans-Peter Kriegel, Raymond Ng, Jörg Sander
LOF: Identifying Density-Based Local Outliers
Proc. 2nd ACM SIGMOD Int. Conf. on Management of Data (SIGMOD'00)- Since:
- 0.2
- Author:
- Erich Schubert, Elke Achtert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected double
computeLOFScore(KNNSearcher<DBIDRef> knnq, DBIDRef cur, DoubleDataStore lrds)
Compute a single LOF score.private void
computeLOFScores(KNNSearcher<DBIDRef> knnq, DBIDs ids, DoubleDataStore lrds, WritableDoubleDataStore lofs, DoubleMinMax lofminmax)
Compute local outlier factors.protected double
computeLRD(KNNSearcher<DBIDRef> knnq, DBIDIter curr)
Compute a single local reachability distance.private void
computeLRDs(KNNSearcher<DBIDRef> knnq, DBIDs ids, WritableDoubleDataStore lrds)
Compute local reachability distances.TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.OutlierResult
run(Relation<O> relation)
Runs the LOF algorithm on the given database.-
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
-
-
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:Algorithm
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceAlgorithm
- Returns:
- Type restriction
-
run
public OutlierResult run(Relation<O> relation)
Runs the LOF algorithm on the given database.- Parameters:
relation
- Data to process- Returns:
- LOF outlier result
-
computeLRDs
private void computeLRDs(KNNSearcher<DBIDRef> knnq, DBIDs ids, WritableDoubleDataStore lrds)
Compute local reachability distances.- Parameters:
knnq
- KNN queryids
- IDs to processlrds
- Reachability storage
-
computeLRD
protected double computeLRD(KNNSearcher<DBIDRef> knnq, DBIDIter curr)
Compute a single local reachability distance.- Parameters:
knnq
- kNN Querycurr
- Current object- Returns:
- Local Reachability Density
-
computeLOFScores
private void computeLOFScores(KNNSearcher<DBIDRef> knnq, DBIDs ids, DoubleDataStore lrds, WritableDoubleDataStore lofs, DoubleMinMax lofminmax)
Compute local outlier factors.- Parameters:
knnq
- KNN queryids
- IDs to processlrds
- Local reachability distanceslofs
- Local outlier factor storagelofminmax
- Score minimum/maximum tracker
-
computeLOFScore
protected double computeLOFScore(KNNSearcher<DBIDRef> knnq, DBIDRef cur, DoubleDataStore lrds)
Compute a single LOF score.- Parameters:
knnq
- kNN querycur
- Current objectlrds
- Stored reachability densities- Returns:
- LOF score.
-
-