Ejemplo n.º 1
0
    def test_analysis(self, experiment_config, trial_config):
        """Test assessment plot"""
        ar1 = AverageRank()

        with create_experiment(experiment_config, trial_config, ["completed"]) as (
            _,
            experiment,
            _,
        ):
            plot = ar1.analysis("task_name", [(0, experiment)])

        assert type(plot) is plotly.graph_objects.Figure
Ejemplo n.º 2
0
    def test_figure_layout(self, study_experiments_config):
        """Test assessment plot format"""
        ar1 = AverageRank()

        with create_study_experiments(**study_experiments_config) as experiments:
            plot = ar1.analysis("task_name", experiments)

            assert_rankings_plot(
                plot,
                [
                    list(algorithm["algorithm"].keys())[0]
                    for algorithm in study_experiments_config["algorithms"]
                ],
                balanced=study_experiments_config["max_trial"],
                with_avg=True,
            )