randconparam(alpha,numdata,numclass,aa,bb,numiter) Generates a sample
from a concentration parameter of a HDP with gamma(aa,bb) prior, and
number of classes and data items given in numdata, numclass (has to be
row vectors).
randconparam(alpha,numdata,numclass,aa,bb,numiter) Generates a sample
from a concentration parameter of a HDP with gamma(aa,bb) prior, and
number of classes and data items given in numdata, numclass (has to be
row vectors).
randconparam(alpha,numdata,numclass,aa,bb,numiter) Generates a sample
from a concentration parameter of a HDP with gamma(aa,bb) prior, and
number of classes and data items given in numdata, numclass (has to be
row vectors).
[cc numclass] = randcrp(alpha,numdata) Generates a partition of numdata
items with concentration parameter alpha, which can be an array, in which
case the Chinese restaurant process has "two new tables to chose for each
new customer".
[cc numclass] = randcrp(alpha,numdata) Generates a partition of numdata
items with concentration parameter alpha, which can be an array, in which
case the Chinese restaurant process has "two new tables to chose for each
new customer".
[cc numclass] = randcrp(alpha,numdata) Generates a partition of numdata
items with concentration parameter alpha, which can be an array, in which
case the Chinese restaurant process has "two new tables to chose for each
new customer".
Generate as many Dirichlet column samples as there are columns (direction
= 1; randdir(A, 1)) or row samples as there are rows (direction = 2,
randdir(A, 2)) in aa (aa[][]), taking the respective parameters.
Generate as many Dirichlet column samples as there are columns (direction
= 1; randdir(A, 1)) or row samples as there are rows (direction = 2,
randdir(A, 2)) in aa (aa[][]), taking the respective parameters.
Generate as many Dirichlet column samples as there are columns (direction
= 1; randdir(A, 1)) or row samples as there are rows (direction = 2,
randdir(A, 2)) in aa (aa[][]), taking the respective parameters.
randnumtable(weights,maxtable) For each entry in weights and maxtables,
generates the number of tables given concentration parameter (weights)
and number of data items (maxtable).
randnumtable(weights,maxtable) For each entry in weights and maxtables,
generates the number of tables given concentration parameter (weights)
and number of data items (maxtable).
randnumtable(weights,maxtable) For each entry in weights and maxtables,
generates the number of tables given concentration parameter (weights)
and number of data items (maxtable).
Instance-based samplers with diverse sampling methods, including beta, gamma,
multinomial, and Dirichlet distributions as well as Dirichlet processes,
using Sethurahman's stick-breaking construction and Chinese restaurant
process.
This function is supposed to do two things: remove the current element
abc from the exponentiated norm and calculate the norm of the remaining
elements by the root.