View source: R/DSC_SlidingWindow.R
DSC_SlidingWindow | R Documentation |
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.
DSC_SlidingWindow(formula = NULL, model = DSC_Kmeans, window, rebuild, ...)
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). |
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.
An object of class DST_SlidingWindow
.
Michael Hahsler
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()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.