DSC_TwoStage: TwoStage Clustering Process

View source: R/DSC_TwoStage.R

DSC_TwoStageR Documentation

TwoStage Clustering Process

Description

Combines an online clustering component (DSC_Micro) and an offline reclustering component (DSC_Macro) into a single process.

Usage

DSC_TwoStage(micro, macro)

Arguments

micro

Clustering algorithm used in the online stage (DSC_Micro)

macro

Clustering algorithm used for reclustering in the offline stage (DSC_Macro)

Details

update() runs the online micro-clustering stage and only when macro cluster centers/weights are requested using get_centers() or get_weights(), then the offline stage reclustering is automatically performed.

Available clustering methods can be found in the See Also section below.

Value

An object of class DSC_TwoStage (subclass of DSC, DSC_Macro) which is a named list with elements:

  • description: a description of the clustering algorithms.

  • micro: The DSD used for creating micro clusters in the online component.

  • macro: The DSD for offline reclustering.

  • state: an environment storing state information needed for reclustering.

with the two clusterers. The names are “

Author(s)

Michael Hahsler

See Also

Other DSC_TwoStage: DSC_DBSTREAM(), DSC_DStream(), DSC_evoStream()

Other DSC: DSC(), DSC_Macro(), DSC_Micro(), DSC_R(), DSC_SlidingWindow(), DSC_Static(), animate_cluster(), evaluate.DSC, get_assignment(), plot.DSC(), predict(), prune_clusters(), read_saveDSC, recluster()

Examples

stream <- DSD_Gaussians(k = 3, d = 2)

# Create a clustering process that uses a window for the online stage and
# k-means for the offline stage (reclustering)
win_km <- DSC_TwoStage(
  micro = DSC_Window(horizon = 100),
  macro = DSC_Kmeans(k = 3)
  )
win_km

update(win_km, stream, 200)
win_km
win_km$micro
win_km$macro

plot(win_km, stream)
evaluate_static(win_km, stream, assign = "macro")

stream documentation built on May 29, 2024, 9:43 a.m.