Package elki.outlier
Class DWOF<O>
- java.lang.Object
-
- elki.outlier.DWOF<O>
-
- Type Parameters:
O
- the type of objects handled by this algorithm
- All Implemented Interfaces:
Algorithm
,OutlierAlgorithm
@Title("DWOF: Dynamic Window Outlier Factor") @Description("Algorithm to compute dynamic-window outlier factors in a database based on the neighborhood size parameter \'k\'") @Reference(authors="R. Momtaz, N. Mohssen, M. A. Gowayyed", title="DWOF: A Robust Density-Based Outlier Detection Approach", booktitle="Proc. 6th Iberian Conf. Pattern Recognition and Image Analysis (IbPRIA 2013)", url="https://doi.org/10.1007/978-3-642-38628-2_61", bibkey="DBLP:conf/ibpria/MomtazMG13") public class DWOF<O> extends java.lang.Object implements OutlierAlgorithm
Algorithm to compute dynamic-window outlier factors in a database based on a specified parameter k, which specifies the number of the neighbors to be considered during the calculation of the DWOF score.Reference:
Rana Momtaz, Nesma Mohssen and Mohammad A. Gowayyed:
DWOF: A Robust Density-Based OutlierDetection Approach.
Proc. 6th Iberian Conf. Pattern Recognition and Image Analysis (IbPRIA 2013)- Since:
- 0.6.0
- Author:
- Omar Yousry
-
-
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 private void
clusterData(DBIDs ids, RangeSearcher<DBIDRef> rnnQuery, WritableDoubleDataStore radii, WritableDataStore<ModifiableDBIDs> labels)
This method applies a density based clustering algorithm.TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.private void
initializeRadii(DBIDs ids, KNNSearcher<DBIDRef> knnq, DistanceQuery<O> distFunc, WritableDoubleDataStore radii)
This method prepares a container for the radii of the objects and initializes radii according to the equation: initialRadii of a certain object = (absoluteMinDist of all objects) * (avgDist of the object) / (minAvgDist of all objects)OutlierResult
run(Relation<O> relation)
Performs the Generalized DWOF_SCORE algorithm on the given database by calling all the other methods in the proper order.private int
updateSizes(DBIDs ids, WritableDataStore<ModifiableDBIDs> labels, WritableIntegerDataStore newSizes)
This method updates each object's cluster size after the clustering step.-
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.
-
kplus
protected int kplus
Holds the value ofDWOF.Par.K_ID
i.e. Number of neighbors to consider during the calculation of DWOF scores + the query point.
-
delta
protected double delta
The radii changing ratio
-
-
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)
Performs the Generalized DWOF_SCORE algorithm on the given database by calling all the other methods in the proper order.- Parameters:
relation
- Data to process- Returns:
- new OutlierResult instance
-
initializeRadii
private void initializeRadii(DBIDs ids, KNNSearcher<DBIDRef> knnq, DistanceQuery<O> distFunc, WritableDoubleDataStore radii)
This method prepares a container for the radii of the objects and initializes radii according to the equation: initialRadii of a certain object = (absoluteMinDist of all objects) * (avgDist of the object) / (minAvgDist of all objects)- Parameters:
ids
- Database IDs to processdistFunc
- Distance functionknnq
- kNN search functionradii
- WritableDoubleDataStore to store radii
-
clusterData
private void clusterData(DBIDs ids, RangeSearcher<DBIDRef> rnnQuery, WritableDoubleDataStore radii, WritableDataStore<ModifiableDBIDs> labels)
This method applies a density based clustering algorithm. It looks for an unclustered object and builds a new cluster for it, then adds all the points within its radius to that cluster. nChain represents the points to be added to the cluster and its radius-neighbors- Parameters:
ids
- Database IDs to processrnnQuery
- Data to processradii
- Radii to cluster accordinglylabels
- Label storage.
-
updateSizes
private int updateSizes(DBIDs ids, WritableDataStore<ModifiableDBIDs> labels, WritableIntegerDataStore newSizes)
This method updates each object's cluster size after the clustering step.- Parameters:
ids
- Object IDs to processlabels
- references for each object's clusternewSizes
- the sizes container to be updated- Returns:
- the number of unclustered objects
-
-