Description Usage Arguments Value
A C++ accelerated version of sugsclusterMarg
1 | sugsclustMargcpp(x, K, i, D, n, betaHat, phi, m, nu, S, lambda, intfeature)
|
x |
A numeric vector containing data of the observation |
K |
An integer specifiying the number of clusters |
i |
An integer specifying the current iteration of SUGS algorithm |
D |
An integer specifiying the number of variables |
n |
A numeric vector contain the number of people already allocated to each cluster |
betaHat |
A numeric vector containing the grid of hyperpriors for the dirichlet concentration parameter |
phi |
A numeric matrix containing the weights for the dirichlet hyperpiors |
m |
A numeric matrix containing the means for each component |
nu |
A numeric vector containg the degrees of freedom for each component |
S |
A numeric matrix containing the scale prior for each component |
lambda |
A numeric vector containing the mean variance hyperparamter for each component |
intfeature |
A binary vector of feature which are parition as irrelevant (0) or relevant (1). |
An arma::vec containg the probability that observation x
belongs to each component
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.