Package elki.outlier.lof
Class VarianceOfVolume<O extends SpatialComparable>
- java.lang.Object
-
- elki.outlier.lof.VarianceOfVolume<O>
-
- Type Parameters:
O
- the type of data objects handled by this algorithm
- All Implemented Interfaces:
Algorithm
,OutlierAlgorithm
@Reference(authors="T. Hu, S. Y. Sung", title="Detecting pattern-based outliers", booktitle="Pattern Recognition Letters 24(16)", url="https://doi.org/10.1016/S0167-8655(03)00165-X", bibkey="DBLP:journals/prl/HuS03") public class VarianceOfVolume<O extends SpatialComparable> extends java.lang.Object implements OutlierAlgorithm
Variance of Volume for outlier detection.The volume is estimated by the distance to the k-nearest neighbor, then the variance of volume is computed.
Unfortunately, this approach needs an enormous numerical precision, and may not work for high-dimensional, non-normalized data. We therefore divide each volume by the average across the data set. This means values are even less comparable across data sets, but this avoids some of the numerical problems of this method.
Reference:
T. Hu, S. Y. Sung
Detecting pattern-based outliers
Pattern Recognition Letters 24(16)- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Constructor Summary
Constructors Constructor Description VarianceOfVolume(int k, Distance<? super O> distance)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
computeVolumes(KNNSearcher<DBIDRef> knnq, int dim, DBIDs ids, WritableDoubleDataStore vols)
Compute volumesprivate void
computeVOVs(KNNSearcher<DBIDRef> knnq, DBIDs ids, DoubleDataStore vols, WritableDoubleDataStore vovs, DoubleMinMax vovminmax)
Compute variance of volumes.TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.OutlierResult
run(Relation<O> relation)
Runs the VOV 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
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
The logger for this class.
-
distance
protected Distance<? super O extends SpatialComparable> distance
Distance function used.
-
kplus
protected int kplus
The number of neighbors to query (plus the query point!)
-
-
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 VOV algorithm on the given database.- Parameters:
relation
- Data to process- Returns:
- VOV outlier result
-
computeVolumes
private void computeVolumes(KNNSearcher<DBIDRef> knnq, int dim, DBIDs ids, WritableDoubleDataStore vols)
Compute volumes- Parameters:
knnq
- KNN querydim
- Data dimensionalityids
- IDs to processvols
- Volume storage
-
computeVOVs
private void computeVOVs(KNNSearcher<DBIDRef> knnq, DBIDs ids, DoubleDataStore vols, WritableDoubleDataStore vovs, DoubleMinMax vovminmax)
Compute variance of volumes.- Parameters:
knnq
- KNN queryids
- IDs to processvols
- Volumesvovs
- Variance of Volume storagevovminmax
- Score minimum/maximum tracker
-
-