DSC_SlidingWindow {stream} | R Documentation |
DSC_SlidingWindow – Data Stream Clusterer Using a Sliding Window
Description
The clusterer keeps a sliding window for the stream and rebuilds a DSC clustering model at regular intervals. By default is uses DSC_Kmeans. Other DSC_Macro clusterer can be used.
Usage
DSC_SlidingWindow(formula = NULL, model = DSC_Kmeans, window, rebuild, ...)
Arguments
formula |
a formula for the classification problem. |
model |
regression model (that has a formula interface). |
window |
size of the sliding window. |
rebuild |
interval (number of points) for rebuilding the regression. Set rebuild to
|
... |
additional parameters are passed on to the clusterer (default is DSC_Kmeans). |
Details
This constructor creates a clusterer based on DST_SlidingWindow
. The clusterer has
a update()
and predict()
method.
The difference to setting up a DSC_TwoStage is that DSC_SlidingWindow
rebuilds
the model in regular intervals, while DSC_TwoStage
rebuilds the model on demand.
Value
An object of class DST_SlidingWindow
.
Author(s)
Michael Hahsler
See Also
Other DSC:
DSC()
,
DSC_Macro()
,
DSC_Micro()
,
DSC_R()
,
DSC_Static()
,
DSC_TwoStage()
,
animate_cluster()
,
evaluate.DSC
,
get_assignment()
,
plot.DSC()
,
predict()
,
prune_clusters()
,
read_saveDSC
,
recluster()
Other DSC_Macro:
DSC_DBSCAN()
,
DSC_EA()
,
DSC_Hierarchical()
,
DSC_Kmeans()
,
DSC_Macro()
,
DSC_Reachability()
Examples
library(stream)
stream <- DSD_Gaussians(k = 3, d = 2, noise = 0.05)
# define the stream clusterer.
cl <- DSC_SlidingWindow(
formula = ~ . - `.class`,
k = 3,
window = 50,
rebuild = 10
)
cl
# update the clusterer with 100 points from the stream
update(cl, stream, 100)
# get the cluster model
cl$model$result
plot(cl$model$result)