Results and metrics#

class OMADS._post._postprocess.PostMADS(x_incumbent=[], xmin=None, coords=[], poll_dirs=[], iter=[], bb_eval=[], psize=[], step_name=[], nd_points=[], counter=0)[source]#

Bases: object

Results postprocessor

Parameters:
output_results(out, all_res=True)[source]#

Create a results file from the saved cache

Parameters:
output_nd_results(out)[source]#

Create a results file from the saved cache

Parameters:

out (Output)

output_coordinates(out)[source]#

Save spinners in a json file

Parameters:

out (Output)

class OMADS._post._postprocess.Output(file_path=None, vnames=None, fnames=None, file_writer=None, field_names=[], pname='MADS0', runfolder='undefined', replace=True, step_name='Poll', suffix='all', h_max=inf)[source]#

Bases: object

Results output file decorator

Parameters:
  • file_path (str)

  • vnames (List[str])

  • fnames (List[str])

  • file_writer (Any)

  • field_names (List[str])

  • pname (str)

  • runfolder (str)

  • replace (bool)

  • step_name (str)

  • suffix (str)

  • h_max (float)

class OMADS._metrics._metrics.Metrics(nd_solutions=None, nobj=2, ref_point=None)[source]#

Bases: object

Parameters:
normalize_data(pareto_front, reference_point)[source]#

Normalize Pareto points and the reference point.

Parameters:
  • pareto_front – List of Pareto points where each point is a tuple (x, y).

  • reference_point – The reference point (rx, ry).

Returns:

Normalized Pareto points and reference point.

hypervolume()[source]#

Compute the hypervolume indicator of a Pareto front.

Parameters: - self._ref_point: A list or array representing the reference point. - front: A list of tuples, where each tuple represents a solution’s objective values.

Returns: - The hypervolume indicator value.

calculate_hypervolume(pf, rp)[source]#

Calculate the hypervolume of a bi-objective Pareto front.

Parameters:
  • pareto_front – A list of Pareto points where each point is a tuple (x, y).

  • reference_point – The reference point (rx, ry) to compute the hypervolume against.

Returns:

Hypervolume of the Pareto front.

generational_distance(true_pareto_front, approximate_pareto_front)[source]#

Compute the generational distance (GD) metric between two Pareto fronts.

Parameters: - true_pareto_front: A list of tuples representing the true Pareto front. - approximate_pareto_front: A list of tuples representing the approximate Pareto front.

Returns: - The generational distance metric value.

inverted_generational_distance(true_pareto_front, approximate_pareto_front)[source]#

Compute the inverted generational distance (IGD) metric between two Pareto fronts.

Parameters: - true_pareto_front: A list of tuples representing the true Pareto front. - approximate_pareto_front: A list of tuples representing the approximate Pareto front.

Returns: - The inverted generational distance metric value.

Run state#

class OMADS._analytics._metadata.MadsState[source]#

Bases: object

A data class for the MADS session state and meta data

fk_frame_center: int = 0#
uk_frame_center: int = 0#
ncache_hits: int = 0#
ordered_frame_centers: Tuple[int, int] = (-1, -1)#
h_max: float | None = inf#
is_phase_one: bool = False#
last_success: SUCCESS_TYPES = 1#
stop_reason: STOP_TYPE = 1#
class OMADS._analytics._metadata.MadsStatistics[source]#

Bases: object

A class for the MADS statistical metrics