prune_clusters: Prune Clusters from a Clustering

View source: R/prune_clusters.R

prune_clustersR Documentation

Prune Clusters from a Clustering

Description

Creates a (static) copy of a clustering where a fraction of the weight or the number of clusters with the lowest weights were pruned.

Usage

prune_clusters(dsc, threshold = 0.05, weight = TRUE)

Arguments

dsc

The DSC object to be pruned.

threshold

The numeric vector of probabilities for the quantile.

weight

should a fraction of the total weight in the clustering be pruned? Otherwise a fraction of clusters is pruned.

Value

Returns an object of class DSC_Static.

Author(s)

Michael Hahsler

See Also

DSC_Static

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

Examples


# 3 clusters with 10% noise
stream <- DSD_Gaussians(k=3, noise=0.1)

dbstream <- DSC_DBSTREAM(r=0.1)
update(dbstream, stream, 500)
dbstream
plot(dbstream, stream)

# prune lightest micro-clusters for 20% of the weight of the clustering
static <- prune_clusters(dbstream, threshold=0.2)
static
plot(static, stream)


stream documentation built on Sept. 3, 2022, 1:06 a.m.