Package elki.outlier.subspace
Class SOD<V extends NumberVector>
- java.lang.Object
-
- elki.outlier.subspace.SOD<V>
-
- Type Parameters:
V- the type of NumberVector handled by this Algorithm
- All Implemented Interfaces:
Algorithm,OutlierAlgorithm
@Title("SOD: Subspace outlier degree") @Description("Outlier Detection in Axis-Parallel Subspaces of High Dimensional Data") @Reference(authors="Hans-Peter Kriegel, Peer Kr\u00f6ger, Erich Schubert, Arthur Zimek", title="Outlier Detection in Axis-Parallel Subspaces of High Dimensional Data", booktitle="Proc. Pacific-Asia Conf. on Knowledge Discovery and Data Mining (PAKDD 2009)", url="https://doi.org/10.1007/978-3-642-01307-2_86", bibkey="DBLP:conf/pakdd/KriegelKSZ09") public class SOD<V extends NumberVector> extends java.lang.Object implements OutlierAlgorithm
Subspace Outlier Degree: Outlier Detection in Axis-Parallel Subspaces of High Dimensional Data.Reference:
Hans-Peter Kriegel, Peer Kröger, Erich Schubert, Arthur Zimek:
Outlier Detection in Axis-Parallel Subspaces of High Dimensional Data
Proc. Pacific-Asia Conf. on Knowledge Discovery and Data Mining (PAKDD 2009)- Since:
- 0.2
- Author:
- Arthur Zimek
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSOD.Par<V extends NumberVector>Parameterization class.static classSOD.SODModelSOD Model class-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Field Summary
Fields Modifier and Type Field Description private doublealphaAlpha (discriminance value).private intknnNeighborhood size.private static LoggingLOGThe logger for this class.private booleanmodelsReport models.private Similarity<V>similarityFunctionSimilarity function to use.
-
Constructor Summary
Constructors Constructor Description SOD(int knn, double alpha, Similarity<V> similarityFunction, boolean models)Constructor with parameters.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static double[]computePerDimensionVariances(Relation<? extends NumberVector> relation, double[] center, DBIDs neighborhood)Compute the per-dimension variances for the given neighborhood and center.TypeInformation[]getInputTypeRestriction()Get the input type restriction used for negotiating the data query.private DBIDsgetNearestNeighbors(Relation<V> relation, SimilarityQuery<V> simQ, DBIDRef queryObject)Get the k nearest neighbors in terms of the shared nearest neighbor distance.OutlierResultrun(Relation<V> relation)Performs the SOD algorithm on the given database.private doublesubspaceOutlierDegree(V queryObject, double[] center, long[] weightVector)Compute SOD score.-
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.
-
knn
private int knn
Neighborhood size.
-
alpha
private double alpha
Alpha (discriminance value).
-
similarityFunction
private Similarity<V extends NumberVector> similarityFunction
Similarity function to use.
-
models
private boolean models
Report models.
-
-
Constructor Detail
-
SOD
public SOD(int knn, double alpha, Similarity<V> similarityFunction, boolean models)Constructor with parameters.- Parameters:
knn- knn valuealpha- Alpha parametersimilarityFunction- Shared nearest neighbor similarity functionmodels- Report generated models
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:AlgorithmGet the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestrictionin interfaceAlgorithm- Returns:
- Type restriction
-
run
public OutlierResult run(Relation<V> relation)
Performs the SOD algorithm on the given database.- Parameters:
relation- Data relation to process- Returns:
- Outlier result
-
getNearestNeighbors
private DBIDs getNearestNeighbors(Relation<V> relation, SimilarityQuery<V> simQ, DBIDRef queryObject)
Get the k nearest neighbors in terms of the shared nearest neighbor distance.The query object is excluded from the knn list.
FIXME: move this to the database layer.
- Parameters:
relation- the database holding the objectssimQ- similarity functionqueryObject- the query object for which the kNNs should be determined- Returns:
- the k nearest neighbors in terms of the shared nearest neighbor distance without the query object
-
computePerDimensionVariances
private static double[] computePerDimensionVariances(Relation<? extends NumberVector> relation, double[] center, DBIDs neighborhood)
Compute the per-dimension variances for the given neighborhood and center.- Parameters:
relation- Data relationcenter- Center vectorneighborhood- Neighbors- Returns:
- Per-dimension variances.
-
subspaceOutlierDegree
private double subspaceOutlierDegree(V queryObject, double[] center, long[] weightVector)
Compute SOD score.- Parameters:
queryObject- Query objectcenter- Center vectorweightVector- Weight vector- Returns:
- sod score
-
-