saealib.Decomposition#

class saealib.Decomposition[source]#

Bases: ABC

Abstract base for scalarization (decomposition) functions.

A Decomposition converts a batch of objective vectors into a single scalar score per vector. Smaller scores are always better (minimization convention). The caller is responsible for applying any direction transform before passing f (i.e., f should already be in a minimization frame where smaller = better for every objective).

Parameters:
  • f (np.ndarray) – Objective matrix, shape (N, n_obj). All objectives are assumed to be in minimization direction (direction transform applied by the caller).

  • weights (np.ndarray) – Non-negative weight vector, shape (n_obj,).

  • ideal_point (np.ndarray) – Reference minimum per objective, shape (n_obj,). For methods that do not use the ideal point (e.g. WeightedSumDecomposition), this argument is accepted but ignored.

Returns:

Scalar scores, shape (N,). Lower is better.

Return type:

np.ndarray

Methods

__init__

aggregate

Scalarize a batch of objective vectors.

contract

Return the decomposition contract.

Method Details

Decomposition.__init__()#
abstractmethod Decomposition.aggregate(f, weights, ideal_point)[source]#

Scalarize a batch of objective vectors.

Parameters:
  • f (np.ndarray) – Objective matrix, shape (N, n_obj). Must be in the minimization frame (all objectives: smaller = better).

  • weights (np.ndarray) – Non-negative weight vector, shape (n_obj,).

  • ideal_point (np.ndarray) – Reference minimum per objective, shape (n_obj,).

Returns:

Scalar scores, shape (N,). Lower is better.

Return type:

np.ndarray

Decomposition.contract()[source]#

Return the decomposition contract.

Return type:

ComponentContract