Description Usage Arguments Value See Also Examples
View source: R/hdp_quick_init.R
Initialise a hdpState object with a basic default structure of one top parent DP node
with no associated data, and one child DP node per row of data. Every DP node
shares the same concentration parameter, and will automatically be 'activated'
(made available for posterior samplig). The base distribution is a uniform Dirichlet
with psuedocount 1 in each data category. Can immediately run hdp_posterior
to collect posterior samples.
To define a custom HDP structure, see hdp_init
and hdp_prior_init
.
1 | hdp_quick_init(data, initcc = 2, alphaa = 1, alphab = 1)
|
data |
A |
initcc |
Number of initial data clusters (every data item is randomly assigned to a cluster to start with). |
alphaa |
Shape hyperparameter for the gamma prior over the concentration parameter. |
alphab |
Rate hyperparameter for the gamma prior over the concentration parameter. |
A hdpState object with a basic default structure. See hdpState-class
hdp_init
, hdp_posterior
, hdp_prior_init
1 2 | my_quick_hdp <- hdp_quick_init(example_data_hdp)
my_quick_hdp_chain <- hdp_posterior(my_quick_hdp, 100, 50, 10, 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.