Learn R Programming

CNPBayes (version 1.2.2)

clusters: Accessor for extracting the kmeans clusters from a DensityModel instance

Description

Accessor for extracting the kmeans clusters from a DensityModel instance

Usage

clusters(object)
"clusters"(object)

Arguments

object
an instance of class 'DensityModel'

Value

k-means clustering of the component means using the modes as centers.

See Also

DensityModel-class

Examples

Run this code
truth <- simulateData(N=2500, p=rep(1/3, 3),
                      theta=c(-1, 0, 1),
                      sds=rep(0.1, 3))
dm <- DensityModel(truth)
clusters(dm)

Run the code above in your browser using DataLab