2.2.6. recsys.utils.cy_utils.cy_update_topic_word_mat¶
- 
recsys.utils.cy_utils.cy_update_topic_word_mat()¶
- Calculate new variational parameters of each “topic” dirichlet distribution \(\{\Delta_k^{\star}\}_{k=1}^K\) in place. The formula is described in the equation (10) of obi-CTR paper. - Parameters
- topic_word_mat (ndarray, shape = (n_latent_dims, vocab_size_)) – Variational parameters of each “topic” dirichlet distribution \(\{\Delta_k\}_{k=1}^K\). 
- rows (ndarray of dimension = 1) – rows 
- cols (ndarray of dimension = 1) – cols 
- data (ndarray of dimension = 1) – data 
- n (int or float) – Number of gibbs sampling rounds after burn-in sweeps. 
 
- Returns
- new_topic_word_mat – New variational parameters of each “topic” dirichlet distribution \(\{\Delta_k^{\star}\}_{k=1}^K\). 
- Return type
- ndarray, shape = (n_latent_dims, vocab_size_)