コード例 #1
0
class SupportConnectivityIdentifierTestCase(unittest.TestCase):
    def setUp(self):
        sampler = T2DSampler()
        self.testTable = sampler.getTestTable()
        self.scIdentifier = SupportConnectivityIdentifier()
        self.testTables = sampler.getTablesSubjectIdentificationGoldStandard()

    def testSupportConnectivityIdentifier(self):
        alphas = numpy.arange(0,1.1,0.05)
        for alpha in alphas:
            correctly = 0
            for table in self.testTables[:]:
                supportCeil = 100
                supportFloor = 0
                connectivityThreshold = 0
                subjectColumn = self.scIdentifier.identifySubjectColumn(table, supportFloor, supportCeil, connectivityThreshold, alpha)
                if table.isSubjectColumn(subjectColumn):
                    correctly += 1
            print "alpha: %s" %(alpha)
            print correctly
            print float(correctly) / len(self.testTables)
コード例 #2
0
 def setUp(self):
     sampler = T2DSampler()
     self.testTable = sampler.getTestTable()
     self.scIdentifier = SupportConnectivityIdentifier()
     self.testTables = sampler.getTablesSubjectIdentificationGoldStandard()