Snippets of codes

Enumerate all coordinates

<<<

from pymlbenchmark.plotting.plot_helper import list_col_options
from pandas import DataFrame
df = DataFrame([
    dict(i=1, t='aa', x=0.5),
    dict(i=2, t='bb', x=0.5),
    dict(i=2, t='aa', x=0.5),
])
for opt in list_col_options(df, ['i', 't']):
    print(opt)

# if None...
print(list_col_options(df, None))

>>>

    {'i': 1, 't': 'aa'}
    {'i': 1, 't': 'bb'}
    {'i': 2, 't': 'aa'}
    {'i': 2, 't': 'bb'}
    [None]

(original entry : plot_helper.py:docstring of pymlbenchmark.plotting.plot_helper.list_col_options, line 5)

Plot benchmark improvments

(Source code, png, hires.png, pdf)

_images/plot_bench_xtime-1.png

(original entry : plot_bench_xtime.py:docstring of pymlbenchmark.plotting.plot_bench_xtime.plot_bench_xtime, line 21)

Plot benchmark results

System Message: WARNING/2 (somewhere/workspace/pymlbenchmark/pymlbenchmark_UT_37_std/_doc/sphinxdoc/source/pymlbenchmark/plotting/plot_bench_results.py:docstring of pymlbenchmark.plotting.plot_bench_results.plot_bench_results, line 20)

Exception occurred in plotting plot_bench_results-1 from somewhere/workspace/pymlbenchmark/pymlbenchmark_UT_37_std/_doc/sphinxdoc/source/pymlbenchmark/plotting/plot_bench_results.rst: Traceback (most recent call last): File “/usr/local/lib/python3.7/site-packages/matplotlib/sphinxext/plot_directive.py”, line 515, in run_code exec(code, ns) File “<string>”, line 5, in <module> File “somewhere/workspace/pymlbenchmark/pymlbenchmark_UT_37_std/_doc/sphinxdoc/source/pymlbenchmark/datasets/real_data.py”, line 42, in experiment_results raise FileNotFoundError(“Unable to find dataset ‘{}’.”.format(name)) FileNotFoundError: Unable to find dataset ‘nnxruntime_LogisticRegression’.

(Source code)

(original entry : plot_bench_results.py:docstring of pymlbenchmark.plotting.plot_bench_results.plot_bench_results, line 17)