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)
Run the code above in your browser using DataLab