예제 #1
0
    numexp = args.numexp

    proj_dir = utilmlab.get_proj_dir() \
        if args.projdir is None else args.projdir

    alg = 'asac'

    if args.exe is not None:
        python_exe = args.exe
    else:
        python_exe = 'python' if sys.version_info[0] < 3 else 'python3'

    niter = args.it
    version = 1

    resdir = '{}/result/{}/v_{}/h_{}'.format(
        proj_dir, alg, version,
        os.environ['HOSTNAME'] if 'HOSTNAME' in os.environ else 'unknown')

    utilmlab.ensure_dir(resdir)

    logger = utilmlab.init_logger(resdir, 'log_test_{}.txt'.format(alg))

    result_lst = []

    script = Path('{}/alg/asac/Main_Synthetic_Exp1.py'.format(proj_dir))

    utilmlab.exe_cmd(
        logger, '{} {} {}'.format(python_exe, script,
                                  '--it {} -n {}'.format(niter, numexp)))
예제 #2
0
def set_filenames(odir):
    utilmlab.ensure_dir(odir)
    fn_csv = '{}/x.csv'.format(odir)
    fn_missing_csv = '{}/x_missing.csv'.format(odir)
    fn_imputed_csv = '{}/x_imputed.csv'.format(odir)
    return fn_csv, fn_missing_csv, fn_imputed_csv
def set_filenames(odir):
    utilmlab.ensure_dir(odir)
    fn_csv = '{}/data.csv.gz'.format(odir)
    return fn_csv
    else:
        python_exe = 'python' if sys.version_info[0] < 3 else 'python3'

    niter = args.it
    version = 1

    if args.o is None:
        odir = '{}/result/{}/v_{}/h_{}'.format(
            proj_dir,
            alg,
            version,
            os.environ['HOSTNAME'] if 'HOSTNAME' in os.environ else 'unknown')
    else:
        odir = args.o

    utilmlab.ensure_dir(odir)

    logger = utilmlab.init_logger(odir, 'log_test_{}.txt'.format(alg))

    result_lst = []

    dataset_lst = [
        {
            'dataset': 'SYNTHETIC',
        }
    ]

    script = Path('{}/alg/deephit/main_RandomSearch.py'.format(proj_dir))
    script_ana = Path('{}/alg/deephit/summarize_results.py'.format(proj_dir))

    for args_d in dataset_lst: