Get Cluster Weights

Share:

Description

Get the weights of the clusters in the DSC

Usage

1
	get_weights(x, type=c("auto", "micro", "macro"), scale=NULL, ...)

Arguments

x

The DSC object the weights are being requested from.

type

Return wrights of micro- or macro-clusters in x. Auto uses the class of x to decide.

scale

a range (from, to) to scale the weights. Returns by default the raw weights.

...

Additional arguments are passed on.

Details

The cluster weights are typically a function of how many points were assigned to each cluster.

Value

A vector containing the weight of each micro-cluster or macro-cluster. Internally the call is delegated to the appropriate get_microweights() or get_macroweights() method.

Author(s)

Michael Hahsler

See Also

DSC

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
stream <- DSD_Gaussians(k=3, d=2)
dstream <- DSC_DStream(gridsize=.1)
update(dstream, stream, 500)
dstream
  
# getting the micro-cluster weights
get_weights(dstream)

# D-Stream also has macro-clusters
get_weights(dstream, type="macro")

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.