Learn R Programming

stream (version 1.0-3)

cluster: Cluster a Data Stream

Description

Clusters a number of input points from a data stream into a clustering object.

Usage

cluster(dsc, dsd, n = 1, verbose=FALSE, ...)

Arguments

dsc
a DSC object (clusterer).
dsd
a DSD object (data stream).
n
number of points to cluster.
verbose
report progress.
...
extra arguments for clusterer.

Value

  • The updated DSC object is returned invisibly for reassignment (however, this is not necessary). To obtain the updated clustering result, call get_centers() on the DSC object.

Details

cluster takes n times a single data points out of the DSD and adds it to the clustering in the DSC object. Note that cluster directly modifies the DSC object (which is a reference class) and thus the result does not need to be reassigned to the DSC.

See Also

DSC, DSD, and animation for producing an animation of the clustering process.

Examples

Run this code
dsd <- DSD_Gaussians(k=3)
dsc <- DSC_DStream(gridsize=.05)  

cluster(dsc, dsd, 500)
plot(dsc, dsd)

Run the code above in your browser using DataLab