Learn R Programming

streamMOA (version 1.3-0)

DSC_MCOD: Micro-cluster Continuous Outlier Detector (MCOD)

Description

Class interfaces the MOA implementation of the MCOD algorithm for distance-based data stream outlier detection.

Usage

DSC_MCOD(r = 0.1, t = 50, w = 1000, recheck_outliers = FALSE)

DSOutlier_MCOD(r = 0.1, t = 50, w = 1000, recheck_outliers = TRUE)

get_outlier_positions(x, ...)

recheck_outlier(x, outlier_correlated_id, ...)

clean_outliers(x, ...)

Value

An object of class DSC_MCOD (subclass of DSOutlier, DSC_Micro, DSC_MOA and DSC).

Arguments

r

Defines the micro-cluster radius.

t

Defines the number of neighbors (k in the article).

w

Defines the window width in data points.

recheck_outliers

Defines that the MCOD algorithm allows re-checking of detected outliers.

x

a DSC_MCOD object.

...

further arguments are currently ignored.

outlier_correlated_id

ids of outliers.

Functions

  • get_outlier_positions(): Returns spatial positions of all current outliers.

  • recheck_outlier(): DSC_MCOD Re-checks the outlier having outlier_correlated_id. If this object is still an outlier, the method returns TRUE.

  • clean_outliers(): forget detected outliers from the outlier detector (currently not implemented).

Author

Dalibor Krleža

Details

The algorithm detects density-based outliers. An object \(x\) is defined to be an outlier if there are less than \(t\) objects lying at distance at most \(r\) from \(x\).

Outliers are stored and can be retrieved using get_outlier_position() and recheck_outlier().

Note: The implementation updates the clustering when predict() is called.

References

Kontaki M, Gounaris A, Papadopoulos AN, Tsichlas K, and Manolopoulos Y (2016). Efficient and flexible algorithms for monitoring distance-based outliers over data streams. Information Systems, Vol. 55, pp. 37-53. tools:::Rd_expr_doi("10.1109/ICDE.2011.5767923")

See Also

Other DSC_MOA: DSC_BICO_MOA(), DSC_CluStream(), DSC_ClusTree(), DSC_DStream_MOA(), DSC_DenStream(), DSC_MOA(), DSC_StreamKM()

Examples

Run this code
# Example 1: Clustering with MCOD
stream <- DSD_Gaussians(k = 3, d = 2, noise = 0.05)
mcod <- DSC_MCOD(r = .1, t = 3, w = 100)
update(mcod, stream, 100)
mcod

plot(mcod, stream, n = 100)

# Example 2: Predict outliers (have a class label of NA)
stream <- DSD_Gaussians(k = 3, d = 2, noise = 0.05)
mcod <- DSOutlier_MCOD(r = .1, t = 3, w = 100)
update(mcod, stream, 100)

plot(mcod, stream, n = 100)

# MCOD can retried the outliers
get_outlier_positions(mcod)

# Example 3: evaluate on a stream
evaluate_static(mcod, stream, n = 100, type = "micro",
  measure = c("crand", "noisePrecision", "outlierjaccard"))

Run the code above in your browser using DataLab