Ex8: new non-vectorized recommender systems cost function