# NOT RUN {
stream <- DSD_Gaussians(k=3, noise=0)
# create micro-clusters via sampling
sample <- DSC_Sample(k=20)
update(sample, stream, 500)
sample
# recluster micro-clusters
kmeans <- DSC_Kmeans(k=3)
recluster(kmeans, sample)
plot(kmeans, stream, type="both")
# For comparison we use k-means directly to cluster data
# Note: k-means is not a data stream clustering algorithm
kmeans <- DSC_Kmeans(k=3)
update(kmeans, stream, 500)
plot(kmeans, stream)
# }
Run the code above in your browser using DataLab