Permalink
Browse files

revise the make buffer part

  • Loading branch information...
1 parent 1022411 commit a40db83ff7ac71d7f4fa172a8b47e0803c87f6e6 @Ykid Ykid committed Aug 1, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 utils/SVDModel.py
View
@@ -11,6 +11,7 @@ def __init__(self,configModel,utils,config,strTrial):
'_t' + strTrial
self.numIter = config.SVD_NUM_ITER
self.SVDBufferPath = utils.SVDFEATURE_BUFFER_BINARY
+ self.SVDGroupBufferPath = utils.SVDFEATURE_GROUP_BUFFER_BINARY
self.learningRate = config.SVD_LEARNING_RATE
self.regularizationItem = config.SVD_REGULARIZATION_ITEM
self.regularizationUser = config.SVD_REGULARIZATION_USER
@@ -163,8 +164,12 @@ def dataConvert(self):
os.system(self.SVDBufferPath + ' ' +
self.featTest + ' ' + self.runTest )
if self.featureSet == 'ImplicitFeedback':
-
-
+ os.system(self.SVDGroupBufferPath + ' ' + self.featTrain + \
+ ' ' + self.runTrain + ' ' + '-fd' + ' ' + self.ImfeatTrain)
+ os.system(self.SVDGroupBufferPath + ' ' + self.featCV + \
+ ' ' + self.runCV + ' ' + '-fd' + ' ' + self.ImfeatCV)
+ os.system(self.SVDGroupBufferPath + ' ' + self.featTest + \
+ ' ' + self.runTest + ' ' + '-fd' + ' ' + self.ImfeatTest)
def writeConfig(self):
import os
fout = open(self.configPath,'w')
@@ -283,6 +288,7 @@ def setupImplicitFeatures(self):
IFF.mkImplicitFeatureFile(self.userHistoryReindexPath,self.tmpTest,self.ImfeatTest)
IFF.mkImplicitFeatureFile(self.userHistoryReindexPath,self.tmpGpCV,self.ImfeatCV)
+
#set different parameters
self.numUser=len(Udic)
self.numMovie=len(ItemDic)

0 comments on commit a40db83

Please sign in to comment.