criteria_best['avb'] = 0 criteria_best['lvh'] = 0 criteria_best['spo2'] = 100 criteria_best['hypoglycemia'] = 0.92 criteria_best['hyperglycemia'] = 0.92 criteria_best['sys'] = 9 criteria_best['dia'] = 5 xmcda_models_toshow = [] xmcda_models = [] for f in sys.argv[1:]: if not os.path.isfile(f): xmcda_models_toshow.append(f) continue if is_bz2_file(f) is True: f = bz2.BZ2File(f) tree = ElementTree.parse(f) root = tree.getroot() xmcda_models = root.findall(".//ElectreTri") m = MRSort().from_xmcda(xmcda_models[0]) pt_learning = PerformanceTable().from_xmcda(root, 'learning_set') aa_learning = AlternativesAssignments().from_xmcda(root, 'learning_set') uniquevalues = pt_learning.get_unique_values() bname = os.path.basename(os.path.splitext(f.name)[0])
from test_utils import save_to_xmcda table_ca_learning = [] table_ca_test = [] table_auc_learning = [] table_auc_test = [] cmatrix_learning = {} cmatrix_test = {} DATADIR = os.getenv('DATADIR', '%s/pymcda-data' % os.path.expanduser('~')) directory='%s/test-veto2' % (DATADIR) for f in sys.argv[1:]: fname = os.path.splitext(os.path.basename(f))[0] if is_bz2_file(f) is True: f = bz2.BZ2File(f) tree = ElementTree.parse(f) root = tree.getroot() m = MRSort().from_xmcda(root, 'learned') pt_learning = PerformanceTable().from_xmcda(root, 'learning_set') pt_test = PerformanceTable().from_xmcda(root, 'test_set') aa_learning = AlternativesAssignments().from_xmcda(root, 'learning_set') aa_test = AlternativesAssignments().from_xmcda(root, 'test_set') aa_learning_m2 = m.pessimist(pt_learning)