コード例 #1
0
    v_vals = [np.random.uniform(-1, 1, n) for _ in range(30)]
    k_vals = [2]
    r_vals = [50, 100, 150, 200]
    seed_vals = [373276626, 554197088, 858138413]
    gen_vals = [250]

    exp_folder_name = 'exp1'

    results_path = os.path.join('..', 'results')
    if not os.path.isdir(results_path):
        results_path= os.path.join('..', '..', 'results')
    if not os.path.isdir(results_path):
        results_path = os.path.join('..', '..', '..', 'results')
    if not os.path.isdir(results_path):
        results_path = os.path.join('..', '..', '..', '..', 'results')

    exp1_path = os.path.join(results_path, exp_folder_name)
    if not os.path.isdir(exp1_path):
        os.makedirs(exp1_path)

    output_file = os.path.join(exp1_path,'params.csv')

    gen_params(n=n,
               v_values=v_vals,
               k_values=k_vals,
               r_values=r_vals,
               seed_values=seed_vals,
               gen_values=gen_vals,
               algorithm='CMAES',
               kind='p',
               output_file=output_file)
コード例 #2
0
    v_vals = [np.random.uniform(-1, 1, n) for _ in range(3)]
    k_vals = [2]
    r_vals = [50, 100]
    seed_vals = [47039391]
    gen_vals = [200]

    exp_folder_name = 'exp8'

    results_path = os.path.join('..', 'results')
    if not os.path.isdir(results_path):
        results_path = os.path.join('..', '..', 'results')
    if not os.path.isdir(results_path):
        results_path = os.path.join('..', '..', '..', 'results')
    if not os.path.isdir(results_path):
        results_path = os.path.join('..', '..', '..', '..', 'results')

    exp1_path = os.path.join(results_path, exp_folder_name)
    if not os.path.isdir(exp1_path):
        os.makedirs(exp1_path)

    output_file = os.path.join(exp1_path, 'params.csv')

    gen_params(n=n,
               v_values=v_vals,
               k_values=k_vals,
               r_values=r_vals,
               seed_values=seed_vals,
               gen_values=gen_vals,
               algorithm='1+1',
               kind='lambda',
               output_file=output_file)