gemseo_benchmark / results

Show inherited members

performance_histories module

A class to implement a collection of performance histories.

class gemseo_benchmark.results.performance_histories.PerformanceHistories(*histories)[source]

Bases: MutableSequence

A collection of performance histories.

Parameters:

*histories (PerformanceHistory) – The performance histories.

compute_maximum()[source]

Return the itemwise maximum history of the collection.

Returns:

The itemwise maximum history of the collection.

Return type:

PerformanceHistory

compute_median(compute_low_median=True)[source]

Return the itemwise median history of the collection.

Parameters:

compute_low_median (bool) –

Whether to compute the low median (rather than the high median).

By default it is set to True.

Returns:

The itemwise median history of the collection.

Return type:

PerformanceHistory

compute_minimum()[source]

Return the itemwise minimum history of the collection.

Returns:

The itemwise minimum history of the collection.

Return type:

PerformanceHistory

cumulate_minimum()[source]

Return the histories of the minimum.

Return type:

PerformanceHistories

insert(index, history)[source]

Insert a performance history in the collection.

Parameters:
  • index (int) – The index where to insert the performance history.

  • history (PerformanceHistory) – The performance history.

Return type:

None

plot_algorithm_histories(axes, algorithm_name, max_feasible_objective, plot_all, color, marker, alpha, markevery)[source]

Plot the histories associated with an algorithm.

Parameters:
  • axes (Axes) – The axes on which to plot the performance histories.

  • algorithm_name (str) – The name of the algorithm.

  • max_feasible_objective (float) – The ordinate for infeasible history items.

  • plot_all (bool) – Whether to plot all the performance histories.

  • color (str) – The color of the plot.

  • marker (str) – The marker type of the plot.

  • alpha (float) – The opacity level for overlapping areas. Refer to the Matplotlib documentation.

  • markevery (MarkeveryType) – The sampling parameter for the markers of the plot. Refer to the Matplotlib documentation.

Returns:

The minimum feasible objective value of the median history or None if the median history has no feasible item.

Return type:

float | None