def method3(train, test, justDeltas=False): "HOW" train_DF = csv2DF(train, toBin=False) test_DF = csv2DF(test) clstr = [node(x, what='centroid') for x in where(data=train_DF)] # set_trace() return HOW(train=train, test=test, trainDF=train_DF, testDF=test_DF, clst=clstr, fsel=True).main(justDeltas=justDeltas)
def method2(train, test, justDeltas=False): "CD+FS" train_DF = csv2DF(train, toBin=False) test_DF = csv2DF(test) clstr = [node(x) for x in where(data=train_DF)] # set_trace() return CD(train=train, test=test, trainDF=train_DF, testDF=test_DF, clst=clstr, fsel=True).main(justDeltas=justDeltas)
def main(self, mode='defect', justDeltas=False): if mode == "defect": train_DF = csv2DF(self.train) test_DF = csv2DF(self.train) before = rforest(train=train_DF, test=test_DF) clstr = [node(c) for c in where(data=train_DF)] return patches(train=self.train, test=self.test, clusters=clstr, prune=self.prune, pred=before).newTable(justDeltas=justDeltas)