set.seed(0)
# 3 clusters with 5% noise
dsd <- DSD_Gaussians(k=3)
# cluster with CluStream
dsc <- DSC_CluStream(m=50)
cluster(dsc, dsd, 500)
dsc
# plot micro-clusters
plot(dsc, dsd)
# reclustering. Use weighted k-means for CluStream
kmeans <- DSC_Kmeans(k=3, weighted=TRUE)
recluster(kmeans, dsc)
plot(kmeans, dsd, type="both")
# use k-means automatically
dsc <- DSC_CluStream(m=50, k=3)
cluster(dsc, dsd, 500)
dsc
plot(dsc, dsd, type="both")
Run the code above in your browser using DataLab