module documentation
Algorithm portfolio data set module.
The algorithm portfolio consists in running multiple algorithms in parallel. Current limitation: the portfolio data set must come from data sets that are identical (same number of repetitions on the same instances of the functions.
Example:
import glob
from pylab import *
import pickle
import cocopp
import cocopp.compall.pprldmany
import cocopp.algportfolio
# Collect and unarchive data
dsets = {}
for alg in ('BIPOP-CMA-ES_hansen_noiseless', 'NEWUOA_ros_noiseless'):
dsets[alg] = cocopp.load(cocopp.bbob(alg))
# Generate the algorithm portfolio
dspf = cocopp.algportfolio.build(dsets)
dsets['Portfolio'] = dspf # store the portfolio in dsets
# plot the run lengths distribution functions
plt.figure()
for algname, ds in dsets.items():
dataset = ds.dictByDimFunc()[10][13] # DataSet dimension 10 on F13
cocopp.compall.pprldmany.plot(dataset, label=algname)
cocopp.compall.pprldmany.beautify()
legend(loc='best') # Display legend
plt.show()
| Class | |
Unit element of algorithm portfolio data set. |
| Exception | |
Undocumented |
| Function | build |
Merge datasets in an algorithm portfolio. |
Merge datasets in an algorithm portfolio.
| Parameters | |
| dict | Undocumented |
| sorted | Undocumented |
| dict dict | dictionary of data sets with algorithm name for keys, see pproc.DataSetList.dictByAlg |
| seq sorted | sequence for sorting the entries of
dictAlg, if not provided,
dictAlg.keys() will be instead |
| Returns | |
an instance of DataSetList with the porfolio
data sets | |