2.2.5. recsys.utils.cy_utils.cy_calc_new_item_cov

recsys.utils.cy_utils.cy_calc_new_item_cov()

Calculate new diagonals of the item covariance matrix \(\Sigma_{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_cov (ndarray, shape = (n_latent_dims,)) – Diagonals of item covariance matrix \(\Sigma_{vj}\).

  • 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_cov – New diagonals of the user covariance matrix \(\Sigma_{vj}^{*}\).

Return type

ndarray, shape = (n_latent_dims,)