def readSigsets(self): self.sigset_dir = os.path.join(self.location,"sigsets") self.orig_sigset_path = os.path.join(self.location,"sigsets","FRGC_Exp_2.0.4_Orig.xml") self.query_sigset_path = os.path.join(self.location,"sigsets","FRGC_Exp_2.0.4_Query.xml") self.target_sigset_path = os.path.join(self.location,"sigsets","FRGC_Exp_2.0.4_Target.xml") self.training_sigset_path = os.path.join(self.location,"sigsets","FRGC_Exp_2.0.4_Training.xml") self.orig_sigset = BEE.parseSigSet(self.orig_sigset_path) self.query_sigset = BEE.parseSigSet(self.query_sigset_path) self.target_sigset = BEE.parseSigSet(self.target_sigset_path) self.training_sigset = BEE.parseSigSet(self.training_sigset_path) self.orig_sigset_map = dict([ (data[0]['name'],[key,data]) for key,data in self.orig_sigset ]) self.query_sigset_map = dict([ (data[0]['name'],[key,data]) for key,data in self.query_sigset ]) self.target_sigset_map = dict([ (data[0]['name'],[key,data]) for key,data in self.target_sigset ]) self.training_sigset_map = dict([ (data[0]['name'],[key,data]) for key,data in self.training_sigset ]) self.orig_keys = [ data[0]['name'] for key,data in self.orig_sigset ] self.query_keys = [ data[0]['name'] for key,data in self.query_sigset ] self.target_keys = [ data[0]['name'] for key,data in self.target_sigset ] self.training_keys = [ data[0]['name'] for key,data in self.training_sigset ] # Check that everything adds up. assert len(set(self.orig_keys)) == len(self.orig_keys) assert len(set(self.query_keys + self.target_keys + self.training_keys)) == len(self.orig_keys) assert len(set(self.query_keys + self.target_keys + self.training_keys)) == len(self.query_keys) + len(self.target_keys) + len(self.training_keys)
def readSigsets(self): self.orig_sigset_path = os.path.join(self.location,"BEE_DIST","FRGC1.0","signature_sets","all.xml") self.orig_sigset = BEE.parseSigSet(self.orig_sigset_path) #print self.orig_sigset self.orig_sigset = filter(lambda x: len(x[1]) > 0, self.orig_sigset) self.orig_sigset_map = dict([ (data[0]['name'],[key,data]) for key,data in self.orig_sigset ]) self.orig_keys = [ data[0]['name'] for key,data in self.orig_sigset ]