recluster | R Documentation |
Use an *offline macro clustering algorithm to recluster micro-clusters into a final clusters.
recluster(macro, micro, type = "auto", ...) ## S3 method for class 'DSC_Macro' recluster(macro, micro, type = "auto", ...)
macro |
an empty DSC_Macro. |
micro |
an updated DSC_Micro with micro-clusters. |
type |
controls which clustering is used from |
... |
additional arguments passed on. |
Takes centers and weights of the micro-clusters and applies the macro clustering algorithm.
See DSC_TwoStage for a convenient combination of micro and macro clustering.
The object macro
is altered in place and contains the clustering.
Michael Hahsler
Other DSC:
DSC_Macro()
,
DSC_Micro()
,
DSC_R()
,
DSC_SlidingWindow()
,
DSC_Static()
,
DSC_TwoStage()
,
DSC()
,
animate_cluster()
,
evaluate.DSC
,
get_assignment()
,
plot.DSC()
,
predict()
,
prune_clusters()
,
read_saveDSC
set.seed(0) ### create a data stream and a micro-clustering stream <- DSD_Gaussians(k = 3, d = 3) ### sample can be seen as a simple online clusterer where the sample points ### are the micro clusters. sample <- DSC_Sample(k = 50) update(sample, stream, 500) sample ### recluster using k-means kmeans <- DSC_Kmeans(k = 3) recluster(kmeans, sample) ### plot clustering plot(kmeans, stream, type = "both", main = "Macro-clusters (Sampling + k-means)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.