saealib.Decomposition#
- class saealib.Decomposition[source]#
Bases:
ABCAbstract base for scalarization (decomposition) functions.
A
Decompositionconverts 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 passingf(i.e.,fshould 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
Scalarize a batch of objective vectors. |
|
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