Skip to contents

Implements the CluStream algorithm for data streams (Aggarwal et al., 2003).

Usage

DSC_CluStream(m = 100, horizon = 1000, t = 2, k = 5)

Arguments

m

Maximum number of micro-clusters.

horizon

Time window used by CluStream.

t

Maximum boundary factor used to decide whether a new point belongs to a micro-cluster. The boundary is t times the root mean square deviation from the micro-cluster center.

k

Number of macro-clusters produced by weighted k-means.

Value

An object of class DSC_CluStream (subclass of stream::DSC_Micro, DSC_MOA and stream::DSC).

Details

This is an interface to the MOA implementation of CluStream.

If k is specified, then CluStream applies a weighted k-means algorithm for reclustering (see Examples section below).

References

Aggarwal CC, Han J, Wang J, Yu PS (2003). "A Framework for Clustering Evolving Data Streams." In "Proceedings of the International Conference on Very Large Data Bases (VLDB '03)," pp. 81-92.

Bifet A, Holmes G, Pfahringer B, Kranen P, Kremer H, Jansen T, Seidl T (2010). MOA: Massive Online Analysis, a Framework for Stream Classification and Clustering. In Journal of Machine Learning Research (JMLR).

Author

Michael Hahsler and John Forrest

Examples

# data with 3 clusters and 5% noise
set.seed(1000)
stream <- DSD_Gaussians(k = 3, d = 2, noise = .05)

# cluster with CluStream
clustream <- DSC_CluStream(m = 50, horizon = 100, k = 3)
update(clustream, stream, 500)
clustream
#> CluStream 
#> Class: moa/clusterers/clustream/WithKmeans, DSC_MOA, DSC_Micro, DSC 
#> Number of micro-clusters: 50 
#> Number of macro-clusters: 3 

plot(clustream, stream, type = "both")