cocopp.bestalg.BestAlgSet(DataSet)
class documentationcocopp.bestalg
(View In Hierarchy)
Unit element of best algorithm data set. Here unit element means for one function and one dimension. This class is derived from :py:class:`DataSet` but it does not inherit from it. Class attributes: - funcId -- function Id (integer) - dim -- dimension (integer) - comment -- comment for the setting (string) - algId -- algorithm name (string) - evals -- collected data aligned by function values (array) - maxevals -- maximum number of function evaluations (array) evals and funvals are arrays of data collected from N data sets. Both have the same format: zero-th column is the value on which the data of a row is aligned, the N subsequent columns are either the numbers of function evaluations for evals or function values for funvals. Known bug: algorithms where the aRT is NaN or Inf are not taken into account!?
Method | __init__ | Instantiate one best algorithm data set with name algId. |
Method | __eq__ | Compare indexEntry instances. |
Method | __ne__ | Undocumented |
Method | __repr__ | Undocumented |
Method | pickle | Save instance to a pickle file. |
Method | createDictInstance | Returns a dictionary of the instances |
Method | detERT | Determine the average running time to reach target values. |
Method | detEvals | Determine the number of evaluations to reach target values. |
Method | get_success_ratio | Undocumented |
Inherited from DataSet:
Method | isBiobjective | Undocumented |
Method | get_testbed_name | Undocumented |
Method | get_data_format | Undocumented |
Method | get_suite | Undocumented |
Method | evals_ 0 | Shall become evals attribute in future. |
Method | evals_ 1 | Undocumented |
Method | evals_ | Undocumented |
Method | consistency_check | checks consistency of data set according to - number of instances - instances used |
Method | computeERTfromEvals | Sets the attributes ert and target from the attribute evals. |
Method | evals_with_simulated_restarts | Return a len(targets) list of samplesize "simulated" run lengths (#evaluations, sorted). |
Method | info | print text info to stdout |
Method | mMaxEvals | Returns the maximum number of function evaluations over all runs (trials), obsolete and replaced by attribute max_eval |
Method | max_eval | maximum number of function evaluations over all runs (trials), |
Method | nbRuns | Returns the number of runs. |
Method | createDictInstanceCount | Returns a dictionary of the instances and their count. |
Method | splitByTrials | Splits the post-processed data arrays by trials. |
Method | generateRLData | Determine the running lengths for reaching the target values. |
Method | detAverageEvals | Determine the average number of f-evals for each target in targets list. If a target is not reached within trial itrail, self.maxevals[itrial] contributes to the average. |
Method | detSuccesses | Determine for each target in targets the number of successful runs, keeping in return list the order in targets. |
Method | detSuccessRates | return a np.array with the success rate for each target in targets, easiest target first |
Method | plot_funvals | plot data of funvals attribute, versatile |
Method | median_evals | return median for each target, unsuccessful runs count. |
Method | plot | plot all data from evals attribute and the median. |
Method | _cut_data | No summary |
Method | _complement_data | insert a line for each target value |
Method | _detMaxEvals | computes for each data column the (maximal) evaluation until final_target was reached, or self.maxevals otherwise. |
Method | __parseHeader | Extract data from a header line in an index entry. |
Method | _detEvals2 | Determine the number of evaluations to reach target values. |
Method | _argsort | return index array for a sorted order of trials. |
Method | _old_plot | plot data from evals attribute. |
Instantiate one best algorithm data set with name algId. :keyword dict_alg: dictionary of datasets, keys are algorithm names, values are 1-element :py:class:`DataSetList`. :keyword algId: name of the to-be-constructed algorithm as string
Save instance to a pickle file.
Saves the instance to a pickle file. If not specified by argument outputdir, the location of the pickle is given by the location of the first index file associated.
Returns a dictionary of the instances
The key is the instance id, the value is a list of index.
Parameters | list targets | target function values of interest |
Returns | list of average running times corresponding to the targets. |
Parameters | seq targets | target precisions |
Returns | list of arrays each corresponding to one value in targets and the list of the corresponding algorithms |