sys.exit(1) in_file = None in_dir = None filter_ = "" corr_measures = None columns = None log_file = None section = "evaluate_similarities" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) in_file = utils.config_get(section, config, "input", None) in_dir = utils.config_get(section, config, "in_dir", None) filter_ = utils.config_get(section, config, "filter", filter_) corr_measures = utils.config_get(section, config, "correlation_measure", None) if not corr_measures is None: corr_measures = corr_measures.split(",") columns = utils.config_get(section, config, "columns", None) if not columns is None: columns = columns.split(",") log_file = utils.config_get(section, config, "log", None) for opt, val in opts: if opt in ("-i", "--input"): in_file = val elif opt in ("-m", "--correlation_measure"): corr_measures = val.split(",")
out_dir = None in_file = None sim_measures = None spaces = None columns = None log_file = None in_dir = None section = "compute_similarities" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file = utils.config_get(section, config, "input", None) in_dir = utils.config_get(section, config, "in_dir", None) sim_measures = utils.config_get(section, config, "sim_measures", None) if not sim_measures is None: sim_measures = sim_measures.split(",") spaces = utils.config_get(section, config, "space", None) if not spaces is None: spaces = spaces.split(",") columns = utils.config_get(section, config, "columns", None) if not columns is None: columns = columns.split(",") log_file = utils.config_get(section, config, "log", None) for opt, val in opts: if opt in ("-i", "--input"):
crossvalidation = "False" intercept = "True" param_range = None arg_space = None phrase_space = None export_params = "False" log_file = None param = None section = "train_composition" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file = utils.config_get(section, config, "input", None) model = utils.config_get(section, config, "model", None) regression = utils.config_get(section, config, "regression", None) crossvalidation = utils.config_get(section, config, "crossvalidation", crossvalidation) intercept = utils.config_get(section, config, "intercept", intercept) param_range = utils.config_get(section, config, "lambda_range", None) if not param_range is None: param_range = param_range.split(",") param = utils.config_get(section, config, "lambda", None) arg_space = utils.config_get(section, config, "arg_space", None) if not arg_space is None: arg_space = arg_space.split(",") phrase_space = utils.config_get(section, config, "phrase_space", None) export_params = utils.config_get(section, config, "export_params",
in_file_prefix = None core_space_file = None log_file = "./build_core_space.log" in_format = None out_format = None core_in_dir = None core_filter = "" gz = "False" section = "build_peripheral_space" if len(argv) == 1: config_file = argv[0] config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file_prefix = utils.config_get(section, config, "input", None) core_space_file = utils.config_get(section, config, "core", None) core_in_dir = utils.config_get(section, config, "core_in_dir", None) core_filter = utils.config_get(section, config, "core_filter", "") log_file = utils.config_get(section, config, "log", "./build_core_space.log") in_format = utils.config_get(section, config, "input_format", None) out_format = utils.config_get(section, config, "output_format", None) gz = utils.config_get(section, config, "gz", gz) for opt, val in opts: if opt in ("-i", "--input"): in_file_prefix = val elif opt in ("-o", "--output"): out_dir = val elif opt == "--gz":
selections = [None] reductions = [None] normalizations = [None] log_file = None in_format = None out_format = None gz = "False" section = "build_core_space" if len(argv) == 1: config_file = argv[0] with open(config_file) as f: pass config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file_prefix = utils.config_get(section, config, "input", None) weightings = utils.config_get(section, config, "weighting", [None]) if not weightings == [None]: weightings = weightings.split(",") selections = utils.config_get(section, config, "selection", [None]) if not selections == [None]: selections = selections.split(",") reductions = utils.config_get(section, config, "reduction", [None]) if not reductions == [None]: reductions = reductions.split(",") normalizations = utils.config_get(section, config, "normalization", [None]) if not normalizations == [None]:
sys.exit(1) in_file = None in_dir = None filter_ = "" corr_measures = None columns = None log_file = None section = "evaluate_similarities" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) in_file = utils.config_get(section, config, "input", None) in_dir = utils.config_get(section, config, "in_dir", None) filter_ = utils.config_get(section, config, "filter", filter_) corr_measures = utils.config_get(section, config, "correlation_measure", None) if not corr_measures is None: corr_measures = corr_measures.split(",") columns = utils.config_get(section, config, "columns", None) if not columns is None: columns = columns.split(",") log_file = utils.config_get(section, config, "log", None) for opt, val in opts: if opt in ("-i", "--input"): in_file = val elif opt in ("-m", "--correlation_measure"):
out_dir = None in_file = None sim_measure = None spaces = None log_file = None no_neighbours = "20" if (len(argv) == 1): config_file = argv[0] with open(config_file) as f: pass config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file = utils.config_get(section, config, "input", None) sim_measure = utils.config_get(section, config, "sim_measure", None) spaces = utils.config_get(section, config, "space", None) if not spaces is None: spaces = spaces.split(",") no_neighbours = utils.config_get(section, config, "no_neighbours", no_neighbours) log_file = utils.config_get(section, config, "log", None) for opt, val in opts: if opt in ("-i", "--input"): in_file = val elif opt in ("-o", "--output"): out_dir = val elif opt in ("-m", "--sim_measure"): sim_measure = val
model = None arg_space = None trained_model = None alpha = None beta = None lambda_ = None log_file = None out_format = None section = "apply_composition" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file = utils.config_get(section, config, "input", None) model = utils.config_get(section, config, "model", None) trained_model = utils.config_get(section, config, "load_model", None) arg_space = utils.config_get(section, config, "arg_space", None) if not arg_space is None: arg_space = arg_space.split(",") alpha = utils.config_get(section, config, "alpha", None) beta = utils.config_get(section, config, "beta", None) lambda_ = utils.config_get(section, config, "lambda", None) log_file = utils.config_get(section, config, "log", None) out_format = utils.config_get(section, config, "output_format", None) print opts for opt, val in opts: if opt in ("-i", "--input"):
crossvalidation = "False" intercept = "True" param_range = None arg_space = None phrase_space = None export_params= "False" log_file = None param = None section = "train_composition" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file = utils.config_get(section, config, "input", None) model = utils.config_get(section, config, "model", None) regression = utils.config_get(section, config, "regression", None) crossvalidation = utils.config_get(section, config, "crossvalidation", crossvalidation) intercept = utils.config_get(section, config, "intercept", intercept) param_range = utils.config_get(section, config, "lambda_range", None) if not param_range is None: param_range = param_range.split(",") param = utils.config_get(section, config, "lambda", None) arg_space = utils.config_get(section, config, "arg_space", None) if not arg_space is None: arg_space = arg_space.split(",") phrase_space = utils.config_get(section, config, "phrase_space", None) export_params = utils.config_get(section, config, "export_params", export_params) log_file = utils.config_get(section, config, "log", None)
sys.exit(1) out_dir = None in_file = None sim_measures = None spaces = None columns = None log_file = None in_dir = None section = "compute_similarities" if (len(argv) == 1): config_file = argv[0] config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file = utils.config_get(section, config, "input", None) in_dir = utils.config_get(section, config, "in_dir", None) sim_measures = utils.config_get(section, config, "sim_measures", None) if not sim_measures is None: sim_measures = sim_measures.split(",") spaces = utils.config_get(section, config, "space", None) if not spaces is None: spaces = spaces.split(",") columns = utils.config_get(section, config, "columns", None) if not columns is None: columns = columns.split(",") log_file = utils.config_get(section, config, "log", None) for opt, val in opts: if opt in ("-i", "--input"):
selections = [None] reductions = [None] normalizations = [None] log_file = None in_format = None out_format = None gz = "False" section = "build_core_space" if len(argv) == 1: config_file = argv[0] with open(config_file) as f: pass config = ConfigParser() config.read(config_file) out_dir = utils.config_get(section, config, "output", None) in_file_prefix = utils.config_get(section, config, "input", None) weightings = utils.config_get(section, config, "weighting", [None]) if not weightings == [None]: weightings = weightings.split(",") selections = utils.config_get(section, config, "selection", [None]) if not selections == [None]: selections = selections.split(",") reductions = utils.config_get(section, config, "reduction", [None]) if not reductions == [None]: reductions = reductions.split(",") normalizations = utils.config_get(section, config, "normalization", [None])