# NOT RUN {
# 3 clusters with 5% noise
stream <- DSD_Gaussians(k=3, d=2, noise=0.05)
denstream <- DSC_DenStream(epsilon=.05)
update(denstream, stream, 500)
denstream
# plot micro-clusters
plot(denstream, stream)
# plot the micro-cluster assignment area
plot(denstream, stream, assignment=TRUE, weights=FALSE)
# show macro-clusters (using density reachability with epsilon x offline)
plot(denstream, stream, type="both")
# reclustering. DenStream micro-clusters with k-means instead
km <- DSC_Kmeans(k=3, weighted=TRUE)
recluster(km, denstream)
plot(km, stream, type="both")
# }
Run the code above in your browser using DataCamp Workspace