01032a5db7f237fe23cce1a7700c748b38ff1077,algorithm/rating/EE.py,EE,buildModel,#EE#,22
Before Change
for entry in self.dao.trainingData:
user, item, rating = entry
error = rating - self.predict(user,item)
u = self.dao.getUserId(user)
i = self.dao.getItemId(item)
self.loss += error ** 2
self.loss += self.regU * (self.X[u] - self.Y[i]).dot(self.X[u] - self.Y[i])
bu = self.Bu[u]
bi = self.Bi[i]
self.loss += self.regB * bu ** 2 + self.regB * bi ** 2
// update latent vectors
self.X[u] -= self.lRate * (error + self.regU) * (self.X[u] - self.Y[i])
self.Y[i] += self.lRate * (error + self.regI) * (self.X[u] - self.Y[i])
self.Bu[u] += self.lRate * (error - self.regB * bu)
self.Bi[i] += self.lRate * (error - self.regB * bi)
iteration += 1
After Change
user, item, rating = entry
error = rating - self.predict(user,item)
u = self.dao.user[user]
i = self.dao.item[item]
self.loss += error ** 2
self.loss += self.regU * (self.X[u] - self.Y[i]).dot(self.X[u] - self.Y[i])
bu = self.Bu[u]
bi = self.Bi[i]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: Coder-Yu/RecQ
Commit Name: 01032a5db7f237fe23cce1a7700c748b38ff1077
Time: 2017-04-15
Author: coderyy@outlook.com
File Name: algorithm/rating/EE.py
Class Name: EE
Method Name: buildModel
Project Name: Coder-Yu/RecQ
Commit Name: 01032a5db7f237fe23cce1a7700c748b38ff1077
Time: 2017-04-15
Author: coderyy@outlook.com
File Name: algorithm/rating/PMF.py
Class Name: PMF
Method Name: buildModel
Project Name: Coder-Yu/RecQ
Commit Name: 95a9f94f38cd9f9aa5ac71a81752790f8d0ca357
Time: 2017-04-11
Author: coderyy@outlook.com
File Name: algorithm/rating/BasicMF.py
Class Name: BasicMF
Method Name: buildModel