. $\psi_u\sim Dirichlet(\mu_x\cdot\beta_1,...,\mu_x\cdot\beta_{N_X})$ (generating user $u$ interest's profile)  . $\phi_r\sim Dirichlet(\mu_z\cdot\alpha_1,...,\mu_z\cdot\alpha_{N_Z})$ (generating resource $r$ topic's profile). 
where µx and µz are concentration parameter, which controls diversity of interests and topics at group specific level. The remaining steps involving generation of tags for each bookmark are the same as in the previous process.

Suppose that there is an infinite number of all possible topics, NZ → ∞, and a portion of them are currently used in some resources. By following [Teh et al. 2006], we can rewrite the global weight distribution of topic components, α, as (α1, ..αkz, αu), where kz is the number of currently used topics components and αu =PNZ
k=kz+1 αk - all of unused topic components. Similarly, we can write (α1, ..., αkz, αu) ∼ Dirichlet(γz/NZ
, ..., γz/NZ
, γzu),
where γz/NZ = γz/Nz and γzu =
(NZ −kz)·γz NZ. The same treatment is also applied to that of interest components.

Now we can generalize Eq. (1) and Eq. (2) for sampling posterior probabilities of topic z and interest x with HDP priors as follows.

For sampling topic component assignment for datapoint i,

$$p(z_{i}=k|\mathbf{z}_{-i},\mathbf{x},\mathbf{t})={\frac{N_{r_{i},z_{-i}}+\mu_{z}\alpha_{k}}{N_{r_{i}}+\mu_{z}-1}}\cdot{\frac{N_{z_{-i},x_{i},t_{i}}+\eta/N_{T}}{N_{z_{-i},x_{i}}+\eta}}$$
$$(10)$$
$$p(z_{i}=k_{n e w}|\mathbf{z}_{-i},\mathbf{x},\mathbf{t})={\frac{\mu_{z}\alpha_{u}}{N_{r_{i}}+\mu_{z}-1}}\cdot{\frac{1}{N_{T}}}$$
NT(11)
For sampling interest component assignment for datapoint $i$, $$p(x_i=j|\mathbf{x}_{-i},\mathbf{z},\mathbf{t})=\frac{N_{u_i,x_{-i}}+\mu_x\beta_j}{N_{u_i}+\mu_x-1}\cdot\frac{N_{x_{-i},z_i,t_i}+\eta/N_T}{N_{x_{-i},z_i}+\eta}$$. 
$$(12)$$
$$(11)$$
$$p(x_{i}=j_{n e w}|\mathbf{x}_{-i},\mathbf{z},\mathbf{t})={\frac{\mu_{x}\beta_{u}/N_{X}}{N_{u_{i}}+\beta-1}}\cdot{\frac{1}{N_{T}}}\,,$$
$$(13)$$
, (13)
where k and j are an index for topic and interest component respectively. From these equations, we allow the model to instantiate a new component from the pool of unused components. Considering the case when a new topic component is instantiated and, for simplicity, we set this new component to be the last used component, indexed with k
′
z
.

We need to obtain weight αk′z for this new component and also update the weight of all unused components, αu′ . From the unused component pool, we know that one of its unused components will be chosen as a newly used component, k
′
z
, with probability distribution (αkz+1/αu**, .., α**NZ /αu) which can be sampled from Dirichlet(γz/NZ**, ..., γ**z/NZ).

Suppose the component k
′
z will be chosen from one of these components and we collapse the remaining unused components. It will be chosen with the probability αk′z
/αu, which can be sampled from Beta(γz/NZ, γzu /NZ − γz/NZ), where **Beta**(.) is a Beta distribution.

Now, suppose k
′
z is chosen. The probability of choosing this component is updated to αk′z
/αu ∼ **Beta**(γz/NZ + 1, γzu /NZ − γz/NZ) . When NZ → ∞, this reduces to αk′z
/αu ∼ Beta(1, γzu /NZ). Hence, to update αk′z
, we first draw a ∼ Beta(1, αu). We then update αk′z ← a.αu and update αu′ ← (1 − a).αu. Similar steps are also applied to interest components.

ACM Journal Name, Vol. x, No. y, zz 2010.