2.2.3. recsys.utils.cy_utils.cy_calc_new_user_cov

recsys.utils.cy_utils.cy_calc_new_user_cov()

Calculate new diagonals of the user covariance matrix \(\Sigma_{ui}^{*}\). The formula is described in the equation (6) of the obi-CTR paper.

Parameters
  • user_cov (ndarray, shape = (n_latent_dims,)) – Diagonals of user covariance matrix \(\Sigma_{ui}\).

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

  • hypa_rat (int or float) – Prior of “rating” normal distribution \(\sigma_{r}^2\).

Returns

new_user_cov – New diagonals of the user covariance matrix \(\Sigma_{ui}^{*}\).

Return type

ndarray, shape = (n_latent_dims,)