2.2.1. recsys.utils.cy_utils.cy_calc_multinomial_pvals

recsys.utils.cy_utils.cy_calc_multinomial_pvals()

Calculate event probabilities of the conditional distribution of one variable \(z_{jn}\) given others. The formula is described in the equation (12) of the obi-CTR paper.

Parameters
  • item_topic_cnt_vec (ndarray, shape = (n_latent_dims,)) – \(\mathbf{C}_j\).

  • lambda_w (ndarray, shape = (n_latent_dims,)) – \(\Lambda_{w}\).

  • item_mean (ndarray, shape = (n_latent_dims,)) – Item mean vector \(\mathbf{m}_{vj}\).

  • n_words (int or float) – Number of words \(N_j\).

  • hypa_alpha (int or float) – Prior of “topic proportion” dirichlet distribution \(\alpha\).

  • hypa_eps (int or float) – Prior of “item latent offset” normal distribution \(\sigma_{\epsilon}^2\).

Returns

pvals – Probabilities that the word \(w_{jn}\) is assigned to each of the topics.

Return type

ndarray, shape = (n_latent_dims,)