Learn R Programming

bpgmm (version 1.0.5)

parsimoniousGaussianMixtureModel: bpgmm Model-Based Clustering Using Baysian PGMM Carries out model-based clustering using parsimonious Gaussian mixture models. MCMC are used for parameter estimation. The RJMCMC is used for model selection.

Description

bpgmm Model-Based Clustering Using Baysian PGMM Carries out model-based clustering using parsimonious Gaussian mixture models. MCMC are used for parameter estimation. The RJMCMC is used for model selection.

Usage

parsimoniousGaussianMixtureModel(niter, burn, X, n, p, delta, ggamma, m,
  qVec, qnew, constraint, dVec, sVec)

Arguments

niter

the number of iterations

burn

the number of burn in iterations

X

the observation matrix with size p * m

n

the number of observations

p

the number of features

delta

scaler hyperparameters

ggamma

scaler hyperparameters

m

the number of clusters

qVec

the vector of the number of factors in each clusters

qnew

the number of factor for a new cluster

constraint

the pgmm constraint, a vector of length three with binary entry. For example, c(1,1,1) means the fully constraint model

dVec

a vector of hyperparameters with length three, shape parameters for alpha1, alpha2 and bbeta respectively

sVec

a vector of hyperparameters with length three, rate parameters for alpha1, alpha2 and bbeta respectively

Value

parsimonious Gaussian mixture models classification results list

Examples

Run this code
# NOT RUN {
sample_data = "https://raw.githubusercontent.com/lzyacht/bpgmm-examples/master/data/sampleData.csv"
X = utils::read.table(sample_data, header = TRUE, sep = ',')
X = as.matrix(X)
nsim = 1
burn = 20
n = ncol(X)
p = nrow(X)
m = 2
qVec = rep(3,m)
qnew = 3
delta = 2
ggamma = 2
dVec = c(1,1,1)
sVec = c(1,1,1)
constraint = c(0,0,0)
# }
# NOT RUN {
parsimoniousGaussianMixtureModel(nsim,burn,X,n,p,delta,ggamma,m,qVec,qnew,constraint,dVec,sVec)
# }
# NOT RUN {

# }

Run the code above in your browser using DataLab