Macro Clusterer. Implementation of hierarchical clustering to recluster a set of micro-clusters.
Usage
DSC_Hierarchical(
formula = NULL,
k = NULL,
h = NULL,
method = "complete",
min_weight = NULL,
description = NULL
)Arguments
- formula
NULLto use all features in the stream or a model formula of the form~ X1 + X2to specify the features used for clustering. Only.,+and-are currently supported in the formula.- k
The number of desired clusters.
- h
Height where to cut the dendrogram.
- method
the agglomeration method to be used. This should be (an unambiguous abbreviation of) one of
"ward","single","complete", "average","mcquitty","median"or"centroid".- min_weight
micro-clusters with a weight less than this will be ignored for reclustering.
- description
optional character string to describe the clustering method.
Value
A list of class DSC, DSC_R, DSC_Macro, and
DSC_Hierarchical. The list contains the following items:
- description
The name of the algorithm in the DSC object.
- RObj
The underlying R object.
Details
Please refer to hclust() for more details on the behavior of the
algorithm.
update() and recluster() invisibly return the assignment of the data points
to clusters.
Note that this clustering cannot be updated iteratively and every time it is used for (re)clustering, the old clustering is deleted.
See also
Other DSC_Macro:
DSC_DBSCAN(),
DSC_EA(),
DSC_Kmeans(),
DSC_Macro(),
DSC_Reachability(),
DSC_SlidingWindow()
Examples
stream <- DSD_Gaussians(k = 3, d = 2, noise = 0.05)
# Use a moving window for "micro-clusters and recluster with HC (macro-clusters)
cl <- DSC_TwoStage(
micro = DSC_Window(horizon = 100),
macro = DSC_Hierarchical(h = .1, method = "single")
)
update(cl, stream, 500)
cl
#> Sliding window + Hierarchical (single)
#> Class: DSC_TwoStage, DSC_Macro, DSC
#> Number of micro-clusters: 100
#> Number of macro-clusters: 6
plot(cl, stream)