687af51bdbf146e1be4c550b0e5a6e336a7bacf6,optuna/testing/visualization.py,,prepare_study_with_trials,#Any#Any#Any#,9

Before Change


    study = create_study()
    if no_trials:
        return study
    study._append_trial(
        value=0.0,
        params={"param_a": 1.0, "param_b": 2.0, "param_c": 3.0, "param_d": 4.0,}
        if with_c_d
        else {"param_a": 1.0, "param_b": 2.0,},
        distributions={
            "param_a": UniformDistribution(0.0, 3.0),
            "param_b": UniformDistribution(0.0, 3.0),
            "param_c": UniformDistribution(2.0, 5.0),
            "param_d": UniformDistribution(2.0, 5.0),
        }
        if with_c_d
        else {"param_a": UniformDistribution(0.0, 3.0), "param_b": UniformDistribution(0.0, 3.0),},
    )
    study._append_trial(
        value=2.0,
        params={"param_b": 0.0, "param_d": 4.0,} if with_c_d else {"param_b": 0.0,},
        distributions={
            "param_b": UniformDistribution(0.0, 3.0),
            "param_d": UniformDistribution(2.0, 5.0),
        }
        if with_c_d
        else {"param_b": UniformDistribution(0.0, 3.0),},
    )
    if less_than_two:
        return study

    study._append_trial(
        value=1.0,
        params={"param_a": 2.5, "param_b": 1.0, "param_c": 4.5, "param_d": 2.0,}
        if with_c_d
        else {"param_a": 2.5, "param_b": 1.0,},
        distributions={
            "param_a": UniformDistribution(0.0, 3.0),
            "param_b": UniformDistribution(0.0, 3.0),
            "param_c": UniformDistribution(2.0, 5.0),
            "param_d": UniformDistribution(2.0, 5.0),
        }
        if with_c_d
        else {"param_a": UniformDistribution(0.0, 3.0), "param_b": UniformDistribution(0.0, 3.0),},
    )
    return study

After Change


    study = create_study()
    if no_trials:
        return study
    study.add_trial(
        create_trial(
            value=0.0,
            params={"param_a": 1.0, "param_b": 2.0, "param_c": 3.0, "param_d": 4.0,}
            if with_c_d
            else {"param_a": 1.0, "param_b": 2.0,},
            distributions={
                "param_a": UniformDistribution(0.0, 3.0),
                "param_b": UniformDistribution(0.0, 3.0),
                "param_c": UniformDistribution(2.0, 5.0),
                "param_d": UniformDistribution(2.0, 5.0),
            }
            if with_c_d
            else {
                "param_a": UniformDistribution(0.0, 3.0),
                "param_b": UniformDistribution(0.0, 3.0),
            },
        )
    )
    study.add_trial(
        create_trial(
            value=2.0,
            params={"param_b": 0.0, "param_d": 4.0,} if with_c_d else {"param_b": 0.0,},
            distributions={
                "param_b": UniformDistribution(0.0, 3.0),
                "param_d": UniformDistribution(2.0, 5.0),
            }
            if with_c_d
            else {"param_b": UniformDistribution(0.0, 3.0),},
        )
    )
    if less_than_two:
        return study

    study.add_trial(
        create_trial(
            value=1.0,
            params={"param_a": 2.5, "param_b": 1.0, "param_c": 4.5, "param_d": 2.0,}
            if with_c_d
            else {"param_a": 2.5, "param_b": 1.0,},
            distributions={
                "param_a": UniformDistribution(0.0, 3.0),
                "param_b": UniformDistribution(0.0, 3.0),
                "param_c": UniformDistribution(2.0, 5.0),
                "param_d": UniformDistribution(2.0, 5.0),
            }
            if with_c_d
            else {
                "param_a": UniformDistribution(0.0, 3.0),
                "param_b": UniformDistribution(0.0, 3.0),
            },
        )
    )
    return study
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: pfnet/optuna
Commit Name: 687af51bdbf146e1be4c550b0e5a6e336a7bacf6
Time: 2020-06-06
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: optuna/testing/visualization.py
Class Name:
Method Name: prepare_study_with_trials


Project Name: pfnet/optuna
Commit Name: 687af51bdbf146e1be4c550b0e5a6e336a7bacf6
Time: 2020-06-06
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: optuna/testing/visualization.py
Class Name:
Method Name: prepare_study_with_trials


Project Name: pfnet/optuna
Commit Name: 687af51bdbf146e1be4c550b0e5a6e336a7bacf6
Time: 2020-06-06
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: tests/visualization_tests/test_parallel_coordinate.py
Class Name:
Method Name: test_plot_parallel_coordinate


Project Name: pfnet/optuna
Commit Name: 687af51bdbf146e1be4c550b0e5a6e336a7bacf6
Time: 2020-06-06
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: tests/visualization_tests/test_utils.py
Class Name:
Method Name: test_is_log_scale


Project Name: pfnet/optuna
Commit Name: 687af51bdbf146e1be4c550b0e5a6e336a7bacf6
Time: 2020-06-06
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: tests/visualization_tests/test_contour.py
Class Name:
Method Name: test_plot_contour_log_scale