Learn R Programming

stream (version 2.0-1)

DSOutlier: Abstract Class for Data Stream Outlier Detectors

Description

The abstract class for all data stream outlier detectors. Cannot be instantiated. Some DSC implementations also implement outlier/noise detection.

Usage

DSOutlier(...)

Arguments

...

further arguments.

Author

Michael Hahsler

Details

plot() has an extra logical argument to specify if outliers should be plotted as red crosses.

See Also

Other DST: DSAggregate(), DSClassifier(), DSC(), DSRegressor(), DST_SlidingWindow(), DST_WriteStream(), DST(), evaluate, predict(), stream_pipeline, update()

Other DSOutlier: DSC_DBSTREAM(), DSC_DStream()

Examples

Run this code
DSOutlier()

#' @examples
set.seed(1000)
stream <- DSD_Gaussians(k = 3, d = 2, noise = 0.1, noise_separation = 5)

outlier_detector <- DSOutlier_DBSTREAM(r = .05, outlier_multiplier = 2)
update(outlier_detector, stream, 500)
outlier_detector

points <- get_points(stream, 20)
points

# Outliers are predicted as class NA
predict(outlier_detector, points)

# Plot new points from the stream. Predicted outliers are marked with a red x.
plot(outlier_detector, stream)

evaluate_static(outlier_detector, stream, measure =
  c("noiseActual", "noisePredicted", "noisePrecision", "outlierJaccard"))

# use a different detector
outlier_detector2 <- DSOutlier_DStream(gridsize = .05, Cl = 0.5, outlier_multiplier = 2)
update(outlier_detector2, stream, 500)
plot(outlier_detector2, stream)

evaluate_static(outlier_detector2, stream, measure =
  c("noiseActual", "noisePredicted", "noisePrecision", "outlierJaccard"))

Run the code above in your browser using DataLab