2.2.4. recsys.utils.cy_utils.cy_calc_new_item_mean¶
-
recsys.utils.cy_utils.
cy_calc_new_item_mean
()¶ Calculate new item mean vector \(\mathbf{m}_{vj}^{*}\). The formula is described in the equation (8) of obi-CTR paper.
- Parameters
user_mean (ndarray, shape = (n_latent_dims,)) – User mean vector \(\mathbf{m}_{ui}\).
item_mean (ndarray, shape = (n_latent_dims,)) – Item mean vector \(\mathbf{m}_{vj}\).
item_cov (ndarray, shape = (n_latent_dims,)) – Diagonals of item covariance matrix \(\Sigma_{vj}\).
emp_topic_freq (ndarray, shape = (n_latent_dims,)) – Empirical topic frequencies \(ar{\mathbf{z}}_j\).
rating (int or float) – Rating given by the user \(i\) to the item \(j\).
hypa_rat (int or float) – Prior of “rating” normal distribution \(\sigma_{r}^2\).
hypa_eps (int or float) – Prior of “item latent offset” normal distribution \(\sigma_{\epsilon}^2\).
- Returns
new_item_mean – New item mean \(\mathbf{m}_{vj}^{*}\).
- Return type
ndarray, shape = (n_latent_dims,)