Commit 0cb4887e by Jiri Borovec

arg param update

parent 79771f5f
......@@ -120,12 +120,11 @@ def create_args_parser(dict_params):
default='synth', choices=['real', 'synth'])
parser.add_argument('-n', '--name', type=str, required=False,
help='specific name', default=None)
parser.add_argument('--dataset', type=str, required=False, # nargs='+',
help='name of dataset to be used',
default=dict_params['dataset'])
parser.add_argument('--dataset', type=str, required=False, nargs='+', default=None,
help='name of dataset to be used')
parser.add_argument('--nb_jobs', type=int, required=False, default=NB_THREADS,
help='number of processes running in parallel')
parser.add_argument('--methods', type=str, required=False, nargs='+', default=None,
parser.add_argument('--method', type=str, required=False, nargs='+', default=None,
help='possible APD methods', choices=['PCA', 'ICA', 'DL', 'APDL'])
return parser
......
......@@ -239,17 +239,20 @@ def experiments_synthetic(params=SYNTH_PARAMS):
logging.info('PARAMS: \n%s', '\n'.join(['"{}": \n\t {}'.format(k, v)
for k, v in arg_params.iteritems()]))
params.update(arg_params)
# params['max_iter'] = 9999
if not 'method' in params:
params['method'] = METHODS.keys()
if not 'dataset' in params:
params['dataset'] = SYNTH_SUB_DATASETS
l_params = [params]
if isinstance(params['dataset'], list):
l_params = expt_apd.extend_list_params(l_params, 'dataset', params['dataset'])
# l_params = expt_apd.extend_list_params(l_params, 'nb_samples',
# np.linspace(0.1, 1, 10).tolist())
l_params = expt_apd.extend_list_params(l_params, 'dataset', SYNTH_SUB_DATASETS)
if not 'methods' in params:
params['methods'] = METHODS.keys()
ptn_range = SYNTH_PTN_RANGE[os.path.basename(params['path_in'])]
for m in params['methods']:
for m in params['method']:
cls_expt = METHODS[m]
if params['nb_jobs'] <= 1:
cls_expt = METHODS_BASE[m]
......
......@@ -234,8 +234,12 @@ def experiments_synthetic(params=SYNTH_PARAMS):
for k, v in arg_params.iteritems()]))
params.update(arg_params)
if not 'dataset' in params:
params['dataset'] = SYNTH_SUB_DATASETS
l_params = [params]
l_params = expt_apd.extend_list_params(l_params, 'dataset', SYNTH_SUB_DATASETS)
if isinstance(params['dataset'], list):
l_params = expt_apd.extend_list_params(l_params, 'dataset', params['dataset'])
l_params = expt_apd.extend_list_params(l_params, 'init_tp', INIT_TYPES)
l_params = expt_apd.extend_list_params(l_params, 'ptn_split', [True, False])
l_params = expt_apd.extend_list_params(l_params, 'gc_regul', GRAPHCUT_REGUL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment