def predict(self, uid, iid, distribution = True):
     """
     predict rating matrix entry given userID and itemID,
     distribution == True when probability distribution is output
     """
     self.initialize(uid, iid, predict = True)   # set avg embeddings for cold-start entries
     m = np.sum(np.multiply(self.u[uid], self.v[iid]), axis=1)
     return softmaxOutput(m, distribution=distribution)
 def predict(self, uid, iid, distribution = True):
     self.initialize(uid, iid, predict = True)
     m = TDreconstruct(self.c, self.u[uid], self.v[iid], self.r)
     return softmaxOutput(m, distribution=distribution)
 def predict(self, uid, iid, distribution=True):
     self.initialize(uid, iid, predict=True)
     L1 = self._L1(uid, iid)
     outL1 = self._outL1(L1)
     L2 = denseLayer(outL1, self.W2, self.B2)
     return softmaxOutput(L2, distribution=distribution)
 def predict(self, uid, iid, distribution = True):
     self.initialize(uid, iid, predict = True)
     L1 = self._L1(uid, iid)
     return softmaxOutput(L1, distribution = distribution)
Beispiel #5
0
 def predict(self, uid, iid, distribution=True):
     self.initialize(uid, iid, predict=True)
     L1 = self._L1(uid, iid)
     outL1 = self._outL1(L1)
     m = np.sum(np.multiply(self.W2, outL1), axis=1)
     return softmaxOutput(m, distribution=distribution)