numbbo / coco

Numerical Black-Box Optimization Benchmarking Framework
https://numbbo.github.io/coco
Other
263 stars 91 forks source link

Target definition in the postprocessing module - testbedsettings.py #2308

Closed Yash-Pisat closed 3 months ago

Yash-Pisat commented 5 months ago

I have added a custom function to the COCO framework. I have an optimal/desired range to which I need to optimize the function. For example, My target is to get the value of the function in 7.5 to 9.5. Is it possible to set such a value range or condition in the testbedsettings.py file?

brockho commented 5 months ago

Hi!

Everything in testbedsettings.py that has something with target in its name is related to what you want. Depending on the plot/table, you would like to change, you will have to change the entry in the settings dictionary:

hardesttargetlatex='10^{-8}',  # used for ppfigs, pptable and pptables
ppfigs_ftarget=1e-8,  # to set target runlength in expensive setting, use genericsettings.target_runlength
ppfig2_ftarget=1e-8,
ppfigdim_target_values=(10, 1, 1e-1, 1e-2, 1e-3, 1e-5, 1e-8),
pprldistr_target_values=(10., 1e-1, 1e-4, 1e-8),
pprldmany_target_values=10 ** np.arange(2, -8.2, -0.2),
pprldmany_target_range_latex='$10^{[-8..2]}$',
ppscatter_target_values=np.array(list(np.logspace(-8, 2, 21)) + [inf_like]),  # 21 was 46
ppfvdistr_min_target=1e-8,
pptable_ftarget=1e-8,  # value for determining the success ratio in all tables
pptable_targetsOfInterest=pptable_targetsOfInterest,
pptablemany_targetsOfInterest=pptable_targetsOfInterest,
# expensive optimization settings:
pptable_target_runlengths=pptable_target_runlengths,
pptables_target_runlengths=pptable_target_runlengths,

pptable relates to all tables, created when 1 algorithm is compared pptables relates to all tables, created when more 2 algorithms are compared pptablemany relates to all tables, created when more than 2 algorithms are compared ppfvdistr and pprldistr relate to the runtime distribution plots when 1 algorithm is compared ppscatter relates to the scatter plot for 2 algorithms pprldmany relates to the ECDF plots, created when more than 2 algorithms are compared pprldistr relates to all tables, created when 1 algorithm is compared ppfigdim, ppfig2 and ppfigs relate to the scaling-with-dimension plots (if I am not mistaken), depending on whether 1, 2, or more than 2 algorithms are compared The entries with latex in the name correspond to the LaTeX output (in particular for the captions).