Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set and obtain the detail info for observer options? #2275

Open
tinaZC opened this issue Apr 18, 2024 · 3 comments
Open

How to set and obtain the detail info for observer options? #2275

tinaZC opened this issue Apr 18, 2024 · 3 comments

Comments

@tinaZC
Copy link

tinaZC commented Apr 18, 2024

May I ask how to set and obtain the detail info for observer options, such as number_targed_triggers, Number_evaluation triggers, Target_precision. It seems can be set or obtained, but I couldn't find any relevant introduction in the help document.

@tinaZC
Copy link
Author

tinaZC commented Apr 18, 2024

The default value of number_target_triggers is 100 (see https://numbbo.github.io/coco-doc/C/#observer-parameters ), but it is said that "the The default target precision values are 51 evenly logspaced values between 10−8 and 102“ in 《COCO: a platform for comparing continuous optimizers in a black-box setting》.
1
2

@brockho
Copy link
Contributor

brockho commented Apr 19, 2024

Hello,

Many thanks for your question. Let me give you a first general reply and if this is not detailed enough, I am sure we can figure out how to help more concretely.

First of all, there is a difference for the target choices between logging and displaying. For logging, the default is to trigger the writing of data, every time any of number_target_triggers (=100 by default) target values per order of magnitude are reached. So if you are not interested in displaying runtimes for target values smaller than the lowest target (typically $10^{-8}$ for most COCO test suites), you don't have to touch this. For displaying, the default depends on the test suite that is used (for example "51 evenly logspaced values between $10^{−8}$ and $10^{2}$ for the bbob test suite).

To answer your actual question, you should be able to change both defaults. For the experimental part, this will change slightly, depending on the language you use, but for python, for example, you can do this as

observer = cocoex.Observer(suite_name, "number_target_triggers: 101, result_folder: " + output_folder)

[line 118 of the example_experiment2.py]

For the postprocessing part, the choice of the displayed targets is both suite- and plot-dependent and is defined in the testbedsettings.py file. For example, to change the displayed targets in the empirical runtime distributions plots (aka ECDF plots, aka data profiles, ...) for the bbob suite and for more than two algorithms, you will have to do the following:

import cocopp
cocopp.testbedsettings.GECCOBBOBTestbed.settings['pprldmany_target_values'] = [10, 1, 0.1, 0.01, 0.001]
cocopp.testbedsettings.GECCOBBOBTestbed.settings['pprldmany_target_range_latex'] = '$10^{[-3..1]}$'
cocopp.config.config()

While the second and third line set the parameters, the last line makes sure that these are actually taken into account for the next cocopp.main(...) call. Each test suite class' settings is a dictionary and has different entries for the different plots, for example pptablemany_targetsOfInterest for the displayed targets in the tables for more than two algorithms. There is no single place (right now) where the displayed targets can be changed globally because it depends on the plot as well as on the suite what are reasonable values.

Hope that helped. If you have further questions, please let us know.

@tinaZC
Copy link
Author

tinaZC commented Apr 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants