# 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