Trial#

class optimas.core.Trial(varying_parameters, objectives, analyzed_parameters=None, parameter_values=None, evaluations=None, index=None, custom_parameters=None)#

Defines a trial to be evaluated.

Parameters:
varying_parameterslist of VaryingParameter

The varying parameters of the optimization.

objectiveslist of Objective

The optimization objectives.

analyzed_parameterslist of Parameter, optional

Additional parameters to be analyzed during the optimization.

parameter_valueslist of float, optional

Values of the varying parameters in this trial.

evaluationslist of Evaluation, optional.

The evaluations obtained in this trial (one per objective and analyzed parameter).

indexint, optional

Index of the trial.

custom_parameterslist of TrialParameter, optional

Additional parameters needed to identify or carry out the trial, and which will be included in the optimization history.

Methods

analyzed_parameters_as_dict()

Get a mapping between names and values of the analyzed parameters.

complete_evaluation(evaluation)

Complete the evaluation of an objective or analyzed parameter.

custom_parameters_as_dict()

Get a mapping between names and values of the custom parameters.

from_dict(trial_dict, varying_parameters, ...)

Create a trial from a dictionary.

ignore(reason)

Set trial as ignored.

mark_as(status)

Set trial status.

objectives_as_dict()

Get a mapping between names and values of the objectives.

parameters_as_dict()

Get a mapping between names and values of the varying parameters.

to_dict()

Convert the trial to a dictionary.

Attributes

analyzed_parameters

Get the list of analyzed parameters.

completed

Determine whether the trial has been successfully evaluated.

custom_parameters

Get the list of custom trial parameters.

evaluated

Determine whether the trial has been evaluated.

failed

Determine whether the trial evaluation has failed.

gen_id

Get the index of the trial.

ignored

Get whether the trial is ignored by the generator.

ignored_reason

Get the reason why the trial is ignored by the generator.

index

Get the index of the trial.

objective_evaluations

Get list of evaluations (one evaluation per objective).

objectives

Get the list of objectives.

parameter_evaluations

Get list of evaluations (one evaluation per analyzed parameter).

parameter_values

Get a list with the values of the varying parameters.

status

Get current trial status.

varying_parameters

Get the list of varying parameters.