def __init__(self, tasktype, callall=False, verbose=1, testMode=False): self.verbose = verbose self.callall = callall self.scoreRank = self.__getScoreOfDIG(tasktype) self.subRank = None if "#" in tasktype: pos = tasktype.find("#") self.subRank = self.__getSubnumOfDIG(tasktype[:pos]) else: self.subRank = self.__getSubnumOfDIG(tasktype) if testMode: self.userlist = getUsers(tasktype + "-test", 2) else: self.userlist = getUsers(tasktype, 2)
def initData(self): self.mymetric = TopKMetrics(tasktype=self.datatype, testMode=True) self.subExpr = self.mymetric.subRank self.userIndex = getUsers(self.datatype + "-test", mode=2) print("model init for %d users" % len(self.userIndex), "%d tasks" % len(self.subExpr))
def initData(self): self.mymetric = TopKMetrics(tasktype=self.datatype, testMode=True) self.subExpr = self.mymetric.subRank self.userIndex = getUsers(self.datatype + "-test", mode=2)
def getRegUsers(self): return getUsers(self.tasktype + "-test", mode)