def testNmfRun(self): self.factor = factorization(self.V, 4) self.estimate = dot(self.factor["basis"], self.factor["coef"]) print self.estimate self.error = self.estimate - self.V
def init_factorization(self, rank = 4): print "start factorization" self.factor = factorization(self.sparse, rank=rank) print "factorization finished"