Learn R Programming

stream (version 0.1-1)

prune_clusters: 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.

See Also

DSC_Static

Examples

Run this code
# 3 clusters with 10% noise
dsd <- DSD_GaussianStatic(k=3, noise=0.1)

birch <- DSC_BIRCH(r=0.01)
cluster(birch, dsd, 500)
birch
plot(birch, dsd)

# prune 10% of the cluster weight
static <- prune_clusters(birch, threshold=0.1)
static
plot(static, dsd)

Run the code above in your browser using DataLab