(self, u, i)
return prediction
Single user and item prediction.
Single user and item prediction.
Single user and item prediction .
def predict(self, u, i):
        """ Single user and item prediction."""
        prediction = self.global_bias + self.user_bias[u] + self.item_bias[i]
        prediction += self.user_vecs[u, :].dot(self.item_vecs[i, :].T)
        return prediction
def predict ( self , u , i ) : prediction = self . global_bias + self . user_bias [ u ] + self . item_bias [ i ] prediction += self . user_vecs [ u , : ] . dot ( self . item_vecs [ i , : ] . T ) return prediction