package documentation

COmparing Continuous Optimisers (COCO) post-processing package

This package (cocopp) generates output figures and tables in html format and for including into LaTeX-documents.

The cocopp.Interface class contains the most basic commands and data of the package, sufficient for most use cases.

>>> import cocopp
>>> sorted(cocopp.Interface.dir())
['archives', 'config', 'genericsettings', 'load', 'main']
>>> all(hasattr(cocopp, name) for name in cocopp.Interface.dir())
True

The main method of the cocopp package is main (currently aliased to cocopp.rungeneric.main). The main method also allows basic use of the post-processing through a command-line interface. The recommended use is however from an IPython/Jupyter shell:

>>> import cocopp
>>> cocopp.main('exdata/my_output another_folder yet_another_or_not')  # doctest:+SKIP

postprocesses data from one or several folders, for example data generated with the help from the cocoex module. Each folder should contain data of a full experiment with a single algorithm. (Within the folder the data can be distributed over subfolders).

Results can be explored from the ppdata/index.html file, unless a a different output folder is specified with the -o option.

Comparative data from over 200 full experiments are archived online and can be listed, filtered, and retrieved from cocopp.archives (of type OfficialArchives) and processed alone or together with local data.

For example

>>> cocopp.archives.bbob('bfgs')  # doctest:+ELLIPSIS,+SKIP,
['2009/BFGS_...

lists all data sets containing 'bfgs' in their name. The search can also use regular expressions where '.' matches any single character and '*' means one or more repetitions:

>>> cocopp.archives.bbob('.*bfgs')  # doctest:+ELLIPSIS,+SKIP,
['2009/BFGS_...

gives the same data sets as above and

>>> cocopp.archives.all('bbob/.*bfgs')  # doctest:+ELLIPSIS,+SKIP,
['bbob/2009/BFGS_...

gives also the same data sets, however extracted from the archive of all suites, which is the search domain when using cocopp.main.

When calling the cocopp.main routine, a single trailing '!' or '*' have the special meaning of take-the-first-only and take-all, respectively. Hence, the first entry of the above selecting list can be postprocessed with

>>> cocopp.main('bfgs!')  # doctest:+SKIP

All 'bfgs' matches from the 'bbob' suite can be processed like

>>> cocopp.main('bbob/.*bfgs')  # doctest:+SKIP

(cocopp.main('bfgs*') raises an error as data from incompatible suites cannot be processed together.)

The postprocessing result of

>>> cocopp.main('bbob/2009/*')  # doctest:+SKIP

can be browsed at http://numbbo.github.io/ppdata-archive/bbob/2009 (or 2009-all).

To display algorithms in the background, the genericsettings.background variable needs to be set:

>>> cocopp.genericsettings.background = {None: cocopp.archives.bbob.get_all('bfgs')}  # doctest:+SKIP

where None invokes the default color (gray) and line style (solid) genericsettings.background_default_style.

Now we could compare our own data with the first 'bfgs'-matching archived algorithm where all other archived BFGS data are shown in the background with

>>> cocopp.main('exdata/my_output bfgs!')  # doctest:+SKIP
Module algportfolio Algorithm portfolio data set module.
Module archiving Online and offline archiving of COCO data.
Module bestalg Best algorithm dataset module
Module bwsettings This module contains settings for outputting black and white figures.
Module captions Provides basic functionality for creating figure and table captions.
Module cococommands A collection of commands for using COCO from Jupyter or IPython.
Package comp2 COmparing Continuous Optimisers (COCO) post-processing tool for comparing two algorithms:
Package compall COmparing Continuous Optimisers (COCO) post-processing tool for comparing multiple algorithms:
Module config This module is an attempt for a global configuration file for various parameters.
Module dataformatsettings No module docstring; 0/2 variable, 2/4 classes documented
Module findfiles Recursively find :file:`info` and zipped files within a directory and administer archives.
Module firstsession First session script.
Module genericsettings This module contains some global variables settings for COCO.
Module grayscalesettings This module contains settings for outputting grayscale figures.
Module htmldesc Prepares the descriptions of images and tables which will be converted to html.
Module old_line_styles old line styles from genericsettings
Module ppconverrorbars Process data and generates some comparison results.
Module ppfig Generic routines for figure generation.
Module ppfigcons1 Generate performance scaling figures wrt constraints. See also:
Module ppfigdim Generate performance scaling figures.
Module ppfigparam Generate ERT vs param. figures.
Module pplogloss Module for computing ERT loss ratio
Module pprldistr For generating empirical cumulative distribution function figures.
Module pprldistr2009_hardestRLB Generates "pprldistr2009_RLB.pickle.gz" that is used to plot, in the background, the results of the 2009 algorithms
Module pproc Raw post-processing routines.
Module ppsingle Single data set results output module.
Module pptable Module for generating tables used by rungeneric1.py.
Module pptex Routines for writing TeX for tables.
Module preparehtml Prepares the figure and table descriptions in html.
Module preparetexforhtml Prepares the descriptions of images and tables which will be converted to html.
Module readalign Helper routines to read in data files.
Module rungeneric Process data to be included in a latex template. Called via
Module rungeneric1 Module for post-processing the data of one algorithm.
Module rungenericmany Process data to be included in a generic template.
Module sanitycheck Module for checking data sets.
Module test Tests the cocopp module.
Module testbedsettings No module docstring; 0/34 variable, 3/10 functions, 11/12 classes documented
Module toolsdivers Various tools.
Module toolsstats Bootstrapping and statistics routines.
Module __main__ Calls rungeneric.py.
Module _version Undocumented

From __init__.py:

Class Interface collection of the most user-relevant modules, methods and data.