
V - Vector type@Title(value="ABOD: Angle-Based Outlier Detection") @Description(value="Outlier detection using variance analysis on angles, especially for high dimensional data sets.") @Reference(authors="H.-P. Kriegel, M. Schubert, and A. Zimek", title="Angle-Based Outlier Detection in High-dimensional Data", booktitle="Proc. 14th ACM SIGKDD Int. Conf. on Knowledge Discovery and Data Mining (KDD \'08), Las Vegas, NV, 2008", url="http://dx.doi.org/10.1145/1401890.1401946") public class ABOD<V extends NumberVector<?>> extends AbstractDistanceBasedAlgorithm<V,DoubleDistance,OutlierResult> implements OutlierAlgorithm
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
ABOD.Parameterizer<V extends NumberVector<?>>
Parameterization class. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
static OptionID | 
FAST_SAMPLE_ID
Parameter for sample size to be used in fast mode. 
 | 
private int | 
k
k parameter. 
 | 
static OptionID | 
K_ID
Parameter for k, the number of neighbors used in kNN queries. 
 | 
static OptionID | 
KERNEL_FUNCTION_ID
Parameter for the kernel function. 
 | 
private static Logging | 
LOG
The logger for this class. 
 | 
static OptionID | 
PREPROCESSOR_ID
The preprocessor used to materialize the kNN neighborhoods. 
 | 
private PrimitiveSimilarityFunction<? super V,DoubleDistance> | 
primitiveKernelFunction
Store the configured Kernel version. 
 | 
(package private) int | 
sampleSize
Variable to store fast mode sampling value. 
 | 
private ArrayDBIDs | 
staticids
Static DBID map. 
 | 
private static boolean | 
USE_RND_SAMPLE
use alternate code below. 
 | 
DISTANCE_FUNCTION_ID| Constructor and Description | 
|---|
ABOD(int k,
    int sampleSize,
    PrimitiveSimilarityFunction<? super V,DoubleDistance> primitiveKernelFunction,
    DistanceFunction<V,DoubleDistance> distanceFunction)
Actual constructor, with parameters. 
 | 
ABOD(int k,
    PrimitiveSimilarityFunction<? super V,DoubleDistance> primitiveKernelFunction,
    DistanceFunction<V,DoubleDistance> distanceFunction)
Actual constructor, with parameters. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
private double | 
calcCos(KernelMatrix kernelMatrix,
       DBIDRef aKey,
       DBIDRef bKey)
Compute the cosinus value between vectors aKey and bKey. 
 | 
private double | 
calcDenominator(KernelMatrix kernelMatrix,
               DBIDRef aKey,
               DBIDRef bKey,
               DBIDRef cKey)  | 
private ComparableMinHeap<DoubleDBIDPair> | 
calcDistsandNN(Relation<V> data,
              KernelMatrix kernelMatrix,
              int sampleSize,
              DBIDRef aKey,
              WritableDoubleDataStore dists)  | 
private ComparableMinHeap<DoubleDBIDPair> | 
calcDistsandRNDSample(Relation<V> data,
                     KernelMatrix kernelMatrix,
                     int sampleSize,
                     DBIDRef aKey,
                     WritableDoubleDataStore dists)  | 
private double[] | 
calcFastNormalization(DBIDRef x,
                     WritableDoubleDataStore dists,
                     DBIDs ids)  | 
private double | 
calcNumerator(KernelMatrix kernelMatrix,
             DBIDRef aKey,
             DBIDRef bKey,
             DBIDRef cKey)  | 
private void | 
generateExplanation(StringBuilder buf,
                   Relation<V> data,
                   DBIDRef key,
                   DBIDs expList)  | 
private double | 
getAbofFilter(KernelMatrix kernelMatrix,
             DBIDRef aKey,
             WritableDoubleDataStore dists,
             double fulCounter,
             double counter,
             DBIDs neighbors)  | 
String | 
getExplanations(Relation<V> data)
Get explanations for points in the database. 
 | 
OutlierResult | 
getFastRanking(Relation<V> relation)
Main part of the algorithm. 
 | 
TypeInformation[] | 
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query. 
 | 
protected Logging | 
getLogger()
Get the (STATIC) logger for this class. 
 | 
OutlierResult | 
getRanking(Relation<V> relation)
Main part of the algorithm. 
 | 
private int | 
mapDBID(DBIDRef aKey)  | 
OutlierResult | 
run(Relation<V> relation)
Run ABOD on the data set. 
 | 
getDistanceFunctionmakeParameterDistanceFunction, runclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrunprivate static final Logging LOG
public static final OptionID K_ID
public static final OptionID FAST_SAMPLE_ID
public static final OptionID KERNEL_FUNCTION_ID
public static final OptionID PREPROCESSOR_ID
private static final boolean USE_RND_SAMPLE
private int k
int sampleSize
private PrimitiveSimilarityFunction<? super V extends NumberVector<?>,DoubleDistance> primitiveKernelFunction
private ArrayDBIDs staticids
public ABOD(int k,
    int sampleSize,
    PrimitiveSimilarityFunction<? super V,DoubleDistance> primitiveKernelFunction,
    DistanceFunction<V,DoubleDistance> distanceFunction)
k - k parametersampleSize - sample sizeprimitiveKernelFunction - Kernel function to usedistanceFunction - Distance functionpublic ABOD(int k,
    PrimitiveSimilarityFunction<? super V,DoubleDistance> primitiveKernelFunction,
    DistanceFunction<V,DoubleDistance> distanceFunction)
k - k parameterprimitiveKernelFunction - kernel function to usedistanceFunction - Distance functionpublic OutlierResult getRanking(Relation<V> relation)
relation - Relation to querypublic OutlierResult getFastRanking(Relation<V> relation)
relation - Relation to useprivate double[] calcFastNormalization(DBIDRef x, WritableDoubleDataStore dists, DBIDs ids)
private double getAbofFilter(KernelMatrix kernelMatrix, DBIDRef aKey, WritableDoubleDataStore dists, double fulCounter, double counter, DBIDs neighbors)
private double calcCos(KernelMatrix kernelMatrix, DBIDRef aKey, DBIDRef bKey)
kernelMatrix - aKey - bKey - private int mapDBID(DBIDRef aKey)
private double calcDenominator(KernelMatrix kernelMatrix, DBIDRef aKey, DBIDRef bKey, DBIDRef cKey)
private double calcNumerator(KernelMatrix kernelMatrix, DBIDRef aKey, DBIDRef bKey, DBIDRef cKey)
private ComparableMinHeap<DoubleDBIDPair> calcDistsandNN(Relation<V> data, KernelMatrix kernelMatrix, int sampleSize, DBIDRef aKey, WritableDoubleDataStore dists)
private ComparableMinHeap<DoubleDBIDPair> calcDistsandRNDSample(Relation<V> data, KernelMatrix kernelMatrix, int sampleSize, DBIDRef aKey, WritableDoubleDataStore dists)
public String getExplanations(Relation<V> data)
data - to get explanations forprivate void generateExplanation(StringBuilder buf, Relation<V> data, DBIDRef key, DBIDs expList)
public OutlierResult run(Relation<V> relation)
relation - Relation to processpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<OutlierResult>protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<OutlierResult>