stream (version 1.3-0)

get_weights: Get Cluster Weights

Description

Get the weights of the clusters in the DSC

Usage

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.

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.

Details

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

See Also

DSC

Examples

Run this code
# NOT RUN {
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")
# }

Run the code above in your browser using DataLab