recluster: Re-clustering micro-clusters

Description Usage Arguments Details Value Author(s) Examples

View source: R/recluster.R

Description

Use a macro clustering algorithm to recluster micro-clusters into a final clustering.

Usage

1
recluster(macro, micro, type="auto", ...)

Arguments

macro

a macro clustering algorithm (class "DSC_Macro")

micro

a DSC object containing micro-clusters.

type

controls which clustering is used from dsc (typically micro-clusters).

...

additional arguments passed on.

Details

Takes centers and weights of the micro-clusters and applies the macro clustering algorithm.

Value

The object macro is altered and contains the clustering.

Author(s)

Michael Hahsler

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
set.seed(0)
### create a data stream and a micro-clustering
stream <- DSD_Gaussians(k=3, d=3)

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, main="Macro-clusters (Sampling + k-means)")

Example output

Loading required package: proxy

Attaching package: 'proxy'

The following objects are masked from 'package:stats':

    as.dist, dist

The following object is masked from 'package:base':

    as.matrix

Reservoir sampling
Class: DSC_Sample, DSC_Micro, DSC_R, DSC 
Number of micro-clusters: 50 

stream documentation built on June 2, 2018, 9:08 a.m.