gemseo.algos.pareto.utils module#

Compute and display a Pareto Front.

compute_pareto_optimal_points(obj_values, feasible_points=None)[source]#

Compute the Pareto optimal points.

Search for all the non-dominated points, i.e. there exists j such that there is no lower value for obj_values[:,j] that does not degrade at least one other objective obj_values[:,i].

Parameters:
  • obj_values (ndarray) -- The objective function array of size (n_samples, n_objs).

  • feasible_points (ndarray | None) -- An array of boolean of size n_sample, True if the sample is feasible, False otherwise.

Returns:

The vector of booleans of size n_samples, True if the point is Pareto optimal.

Return type:

ndarray

generate_pareto_plots(obj_values, obj_names, fig_size=(10.0, 10.0), non_feasible_samples=None, show_non_feasible=True)[source]#

Plot a 2D Pareto front.

Parameters:
  • obj_values (ndarray) -- The objective function array of size (n_samples, n_objs).

  • obj_names (Sequence[str]) -- The names of the objectives.

  • fig_size (FigSizeType) --

    The matplotlib figure sizes in x and y directions, in inches.

    By default it is set to (10.0, 10.0).

  • non_feasible_samples (ndarray | None) -- The array of bool of size n_samples, True if the current sample is non-feasible. If None, all the samples are considered feasible.

  • show_non_feasible (bool) --

    If True, show the non-feasible points in the Pareto front plot.

    By default it is set to True.

Raises:

ValueError -- If the number of objective values and names are different.

Return type:

Figure