init.bmm.parameters | R Documentation |
Initialize the bmm parameters (to be passed to bmm or bmm.fixed.num.components
Initialize parameters such that expected proportions have the values determined by an initial k-means clustering.
NB: This provides what should be a generally reasonable initialization of hyperparameters. However, better results may be obtained by tuning these in an application-specific manner.
init.bmm.parameters(X, N.c, mu0, alpha0, nu0, beta0, c0, verbose=0)
X |
an N x D matrix with rows being the items to cluster. All entries are assumed to be proportions (i.e., between 0 and 1). Notice that there are no summation restrictions–i.e., proportions do not sum to unity across an item's dimensions. |
N.c |
the number of components/clusters to attempt |
mu0 |
a D x N.c matrix holding the hyperparameter values of the shape parameters for the gamma prior distributions over the u parameters. i.e., mu[d,n] is the shape parameter governing u[d,n]. Introduced in eqn (15). |
alpha0 |
a D x N.c matrix holding the hyperparameter values of the rate (i.e., inverse scale) parameters for the gamma prior distributions over the u parameters. i.e., mu[d,n] is the rate parameter governing u[d,n]. Introduced in eqn (15). |
nu0 |
a D x N.c matrix holding the hyperparameter values of the shape parameters for the gamma prior distributions over the v parameters. i.e., nu[d,n] is the shape parameter governing v[d,n]. Introduced in eqn (16). |
beta0 |
a D x N.c matrix holding the hyperparameter values of the rate (i.e., inverse scale) parameters for the gamma prior distributions over the v parameters. i.e., beta[d,n] is the rate parameter governing v[d,n]. Introduced in eqn (16). |
c0 |
a vector with D components holding the hyperparameter values of the parameters of the Dirichlet distribution over the mixing coefficients pi. Introduced in eqn (19). |
verbose |
output progress in terms of mixing coefficient (expected) values if 1. |
A list with the following entries:
mu |
a D x N.c matrix holding the _initial_ values of the shape parameters for the gamma prior distributions over the u parameters. i.e., mu[d,n] is the shape parameter governing u[d,n]. NB: this is the initial value mu, which is updated upon iteration. It is not (necessarily) the same as the hyperparameter mu0, which is unchanged by iteration. Introduced in eqn (15). |
alpha |
a D x N.c matrix holding the _initial_ values of the rate (i.e., inverse scale) parameters for the gamma prior distributions over the u parameters. i.e., mu[d,n] is the rate parameter governing u[d,n]. Introduced in eqn (15). NB: this is the initial value alpha, which is updated upon iteration. It is not (necessarily) the same as the hyperparameter alpha0, which is unchanged by iteration. |
nu |
a D x N.c matrix holding the _initial_ values of the shape parameters for the gamma prior distributions over the v parameters. i.e., nu[d,n] is the shape parameter governing v[d,n]. Introduced in eqn (16). NB: this is the initial value nu, which is updated upon iteration. It is not (necessarily) the same as the hyperparameter nu0, which is unchanged by iteration. |
beta |
a D x N.c matrix holding the _initial_ values of the rate (i.e., inverse scale) parameters for the gamma prior distributions over the v parameters. i.e., beta[d,n] is the rate parameter governing v[d,n]. Introduced in eqn (16). NB: this is the initial value beta, which is updated upon iteration. It is not (necessarily) the same as the hyperparameter beta0, which is unchanged by iteration. |
c |
a vector with D components holding the _initial_ values of the parameters of the Dirichlet distribution over the mixing coefficients pi. Introduced in eqn (19). NB: this is the initial value c, which is updated upon iteration. It is not (necessarily) the same as the hyperparameter c0, which is unchanged by iteration. |
r |
the N x N.c matrix of initial responsibilities, with r[n, nc] giving the probability that item n belongs to component nc |
kmeans.clusters |
an N-vector giving the assignment of each of the N items to a cluster, as determined by kmeans. |
kmeans.centers |
an N.c x D matrix holding the centers of the N.c clusters/components determined by kmeans |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.