platypus.experimenter module
- calculate(results, indicators=[], evaluator=None)
Calculate performance indicators on the results of an experiment.
Parameters
- resultsdict
The results produced by running
experiment().- indicatorslist of Indicator
The performance indicators to evaluate.
- evaluatorEvaluator
The evaluator used to distribute individual jobs.
Returns
A nested
dictcontaining the computed performance indicators. The levels are keyed by the algorithm name, problem name, and indicator name.
- display(results, ndigits=None, file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>)
Pretty-prints the results.
Parameters
- resultsdict
The results produced by running
experiment().- ndigitsint, optional
The number of digits to display.
- filefile-like
The file to store the results. The default prints to standard output.
- experiment(algorithms=[], problems=[], seeds=10, nfe=10000, evaluator=None, display_stats=False)
Run experiments.
Used to run experiments where one or more algorithms are tested on one or more problems.
Parameters
- algorithmslist
List of algorithms to run. Can either be a type of Algorithm or a tuple defining
(type, kwargs, name), where type is the Algorithm’s type, kwargs is a dict defining any optional parameters for the algorithm, and name is a human-readable name for the algorithm. All algorithms must have unique names. If a name is not provided, the type name is used.- problemslist
List of problems to run. Can either be a type of Problem, an instance of a Problem, or a tuple defining
(type, name), where type is the Problem’s type and name is a human-readable name for the problem. All problems must have unique names. If a name is not provided, the type name is used.- seedsint
The number of replicates of each experiment to run.
- nfeint
The number of function evaluations to run each algorithm.
- evaluatorEvaluator
The evaluator used to distribute individual jobs.
- display_statsbool
If
True, the progress of the experiments is output to the screen.
Returns
A nested
dictcontaining the results from each individual run. The levels are keyed by the algorithm name, problem name, and seed number. For instance:pareto_set = result["algorithm"]["problem"][seed]