set.seed(1500)
stream <- DSD_Gaussians(k = 3, d = 2, noise = .1)
dbstream <- DSC_DBSTREAM(r = .1)
update(dbstream, stream, n = 100)
plot(dbstream, stream, type = "both")
# find the assignment for the next 100 points to
# micro-clusters in dsc. This uses the model's assignment function
points <- get_points(stream, n = 10)
points
pr <- predict(dbstream, points, type = "macro")
pr
# Note that the clusters are labeled in arbitrary order. Check the
# agreement.
agreement(pr[,".class"], points[,".class"])
Run the code above in your browser using DataLab