def predict(self, x): C = self.cluster(x) return core.uglyDucklingRecommend(x, C, var=False)
def predictImg(self, imgArray, hist): # We use the image for clustering C = self.cluster(imgArray) # and the corresponding histogram for ugly duckling return core.uglyDucklingRecommend(hist, C)