Esempio n. 1
0
File: CD.py Progetto: ai-se/RAAT
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)
Esempio n. 2
0
File: CD.py Progetto: ai-se/RAAT
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)
Esempio n. 3
0
 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)
Esempio n. 4
0
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)
Esempio n. 5
0
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)