Skip to content

Commit 5ba9489

Browse files
committed
minor improvements
1 parent 1899f0c commit 5ba9489

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

moptipy/evaluation/tabulate_result_tests.py

+15-4
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,16 @@ def tabulate_result_tests(
178178
algorithm ID and returns an instance name; default=identity function
179179
:param use_lang: should we use the language to define the filename
180180
:param p_renderer: the renderer for all probabilities
181-
:param value_getter: the getter for the values that should be compared
181+
:param value_getter: the getter for the values that should be compared. By
182+
default, the best obtained objective values are compared. However, if
183+
you let the runs continue until they reach a certain goal quality,
184+
then you may want to compare the runtimes consumed until that quality
185+
is reached. Basically, you can use any of the getters provided by
186+
:meth:`moptipy.evaluation.end_results.EndResult.getter`, but you must
187+
take care that the comparison makes sense, i.e., compare qualities
188+
under fixed-budget scenarios (the default behavior) or compare
189+
runtimes under scenarios with goal qualities - but do not mix up the
190+
scenarios.
182191
:returns: the path to the file with the tabulated test results
183192
"""
184193
# Before doing anything, let's do some type checking on the parameters.
@@ -319,7 +328,7 @@ def tabulate_result_tests(
319328
alpha_prime)
320329
for j in range(n_insts)]
321330
for i in range(n_cols)]
322-
cols.insert(0, [FormattedStr(instance_namer(inst), code=True)
331+
cols.insert(0, [FormattedStr.add_format(instance_namer(inst), code=True)
323332
for inst in instances])
324333

325334
# We now got the p_values, the comparison results, and the p_strs.
@@ -358,8 +367,10 @@ def __app(a, b):
358367
"'=", alpha_prime_str])
359368
for i in range(n_algos - 1):
360369
for j in range(i + 1, n_algos):
361-
an1 = FormattedStr(algorithm_namer(algorithms[i]), code=True)
362-
an2 = FormattedStr(algorithm_namer(algorithms[j]), code=True)
370+
an1 = FormattedStr.add_format(algorithm_namer(algorithms[i]),
371+
code=True)
372+
an2 = FormattedStr.add_format(algorithm_namer(algorithms[j]),
373+
code=True)
363374
if len(an1) >= len(an2):
364375
__app(an1, ["vs. ", an2])
365376
else:

0 commit comments

Comments
 (0)