"--nseeds", action="store", type="string", dest="nseeds", help="number of seeds") parser.add_option("-f", "--filename", action="store", type="string", dest="filename", help="filename to save csv output") (options, args) = parser.parse_args() while not options.csvfile: options.csvfile = raw_input("CSV file containing data ? ") data = load_mcda_input_data(options.csvfile) if data is None: exit(1) options.pclearning = read_multiple_integer(options.pclearning, "Percentage of data to " \ "use in the learning set") options.nseeds = read_single_integer(options.nseeds, "Number of seeds") dt = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") default_filename = "%s/test_mip_mrsort-%s-%s.csv" \ % (DATADIR, data.name, dt) options.filename = read_csv_filename(options.filename, default_filename) directory = options.filename + "-data" if not os.path.exists(directory):
"%s file.csv meta_mrsort|meta_mrsortc|mip_mrsort|lp_utadis|lp_utadis_compat" % sys.argv[0]) sys.exit(1) if len(sys.argv) != 3: usage() algo = sys.argv[2] nseg = 4 nmodels = 20 nloop = 7 nmeta = 40 data = load_mcda_input_data(sys.argv[1]) print(data.c) worst = data.pt.get_worst(data.c) best = data.pt.get_best(data.c) t1 = time.time() if algo == 'meta_mrsort': heur_init_profiles = HeurMRSortInitProfiles lp_weights = LpMRSortWeights heur_profiles = MetaMRSortProfiles4 elif algo == 'meta_mrsortc': heur_init_profiles = HeurMRSortInitProfiles lp_weights = LpMRSortMobius heur_profiles = MetaMRSortProfilesChoquet
dest = "csvfile", help = "csv file with data") parser.add_option("-p", "--pclearning", action = "store", type="string", dest = "pclearning", help = "Percentage of data to use in learning set") parser.add_option("-s", "--nseeds", action = "store", type="string", dest = "nseeds", help = "number of seeds") parser.add_option("-f", "--filename", action = "store", type="string", dest = "filename", help = "filename to save csv output") (options, args) = parser.parse_args() while not options.csvfile: options.csvfile = raw_input("CSV file containing data ? ") data = load_mcda_input_data(options.csvfile) if data is None: exit(1) options.pclearning = read_multiple_integer(options.pclearning, "Percentage of data to " \ "use in the learning set") options.nseeds = read_single_integer(options.nseeds, "Number of seeds") dt = datetime.datetime.now().strftime("%Y%m%d-%H%M%S") default_filename = "%s/test_mip_mrsort-%s-%s.csv" \ % (DATADIR, data.name, dt) options.filename = read_csv_filename(options.filename, default_filename) directory = options.filename + "-data" if not os.path.exists(directory):
def usage(): print("%s file.csv meta_mrsort|meta_mrsortc|mip_mrsort|lp_utadis|lp_utadis_compat" % sys.argv[0]) sys.exit(1) if len(sys.argv) != 3: usage() algo = sys.argv[2] nseg = 4 nmodels = 20 nloop = 7 nmeta = 40 data = load_mcda_input_data(sys.argv[1]) print(data.c) worst = data.pt.get_worst(data.c) best = data.pt.get_best(data.c) t1 = time.time() if algo == 'meta_mrsort': heur_init_profiles = HeurMRSortInitProfiles lp_weights = LpMRSortWeights heur_profiles = MetaMRSortProfiles4 elif algo == 'meta_mrsortc': heur_init_profiles = HeurMRSortInitProfiles lp_weights = LpMRSortMobius heur_profiles = MetaMRSortProfilesChoquet