scalarization.ASF
Module Contents
Classes
A base class for representing achievement scalarizing functions. |
|
Implements a simple order-representing ASF. |
|
Uses a reference point q and preferential factors to scalarize a MOO problem. |
|
Implements the ASF used in NIMBUS, which takes the maximum of two terms. |
|
Implementation of the satisfying trade-off method (STOM). |
|
Implementation of the reference point based ASF. |
|
Implementation of the augmented GUESS related ASF. |
|
Implementation of the naive or GUESS ASF. |
- exception scalarization.ASF.ASFError[source]
Bases:
Exception
Raised when an error related to the ASF classes is encountered.
Initialize self. See help(type(self)) for accurate signature.
- class scalarization.ASF.ASFBase[source]
Bases:
abc.ABC
A base class for representing achievement scalarizing functions. Instances of the implementations of this class should function as function.
- abstract __call__(objective_vector: numpy.ndarray, reference_point: numpy.ndarray) float | numpy.ndarray [source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.
- class scalarization.ASF.SimpleASF(weights: numpy.ndarray)[source]
Bases:
ASFBase
Implements a simple order-representing ASF.
- Parameters:
weights (np.ndarray) – A weight vector that holds weights. It’s length should match the number of objectives in the underlying MOO problem the achievement problem aims to solve.
- weights
A weight vector that holds weights. It’s length should match the number of objectives in the underlying MOO problem the achievement problem aims to solve.
- Type:
np.ndarray
- __call__(objective_vector: numpy.ndarray, reference_point: numpy.ndarray) float | numpy.ndarray [source]
Evaluate the simple order-representing ASF.
- Parameters:
objective_vector (np.ndarray) – A vector representing a solution in the solution space.
reference_point (np.ndarray) – A vector representing a reference point in the solution space.
Note
The shaped of objective_vector and reference_point must match.
- class scalarization.ASF.ReferencePointASF(preferential_factors: numpy.ndarray, nadir: numpy.ndarray, utopian_point: numpy.ndarray, rho: float = 1e-06)[source]
Bases:
ASFBase
Uses a reference point q and preferential factors to scalarize a MOO problem.
- Parameters:
preferential_factors (np.ndarray) – The preferential factors.
nadir (np.ndarray) – The nadir point of the MOO problem to be scalarized.
utopian_point (np.ndarray) – The utopian point of the MOO problem to be scalarized.
rho (float) – A small number to be used to scale the sm factor in the ASF. Defaults to 0.1.
- preferential_factors
The preferential factors.
- Type:
np.ndarray
- nadir
The nadir point of the MOO problem to be scalarized.
- Type:
np.ndarray
- utopian_point
The utopian point of the MOO problem to be scalarized.
- Type:
np.ndarray
- rho
A small number to be used to scale the sm factor in the ASF. Defaults to 0.1.
- Type:
float
References
Miettinen, K.; Eskelinen, P.; Ruiz, F. & Luque, M. NAUTILUS method: An interactive technique in multiobjective optimization based on the nadir point Europen Journal of Operational Research, 2010, 206, 426-434
- __call__(objective_vector: numpy.ndarray, reference_point: numpy.ndarray) float | numpy.ndarray [source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.
- class scalarization.ASF.MaxOfTwoASF(nadir: numpy.ndarray, ideal: numpy.ndarray, lt_inds: List[int], lte_inds: List[int], rho: float = 1e-06, rho_sum: float = 1e-06)[source]
Bases:
ASFBase
Implements the ASF used in NIMBUS, which takes the maximum of two terms.
- Parameters:
nadir (np.ndarray) – The nadir point.
ideal (np.ndarray) – The ideal point.
lt_inds (List[int]) – Indices of the objectives categorized to be decreased.
lte_inds (List[int]) – Indices of the objectives categorized to be reduced until some value is reached.
rho (float) – A small number to form the utopian point.
rho_sum (float) – A small number to be used as a weight for the sum term.
- nadir
The nadir point.
- Type:
np.ndarray
- ideal
The ideal point.
- Type:
np.ndarray
- lt_inds
Indices of the objectives categorized to be decreased.
- Type:
List[int]
- lte_inds
Indices of the objectives categorized to be reduced until some value is reached.
- Type:
List[int]
- rho
A small number to form the utopian point.
- Type:
float
- rho_sum
A small number to be used as a weight for the sum term.
- Type:
float
References
Miettinen, K. & Mäkelä, Marko M. Synchronous approach in interactive multiobjective optimization European Journal of Operational Research, 2006, 170, 909-922
- __call__(objective_vector: numpy.ndarray, reference_point: numpy.ndarray) float | numpy.ndarray [source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.
- class scalarization.ASF.StomASF(ideal: numpy.ndarray, rho: float = 1e-06, rho_sum: float = 1e-06)[source]
Bases:
ASFBase
Implementation of the satisfying trade-off method (STOM).
- Parameters:
ideal (np.ndarray) – The ideal point.
rho (float) – A small number to form the utopian point.
rho_sum (float) – A small number to be used as a weight for the sum term.
- ideal
The ideal point.
- Type:
np.ndarray
- rho
A small number to form the utopian point.
- Type:
float
- rho_sum
A small number to be used as a weight for the sum term.
- Type:
float
References
Miettinen, K. & Mäkelä, Marko M. Synchronous approach in interactive multiobjective optimization European Journal of Operational Research, 2006, 170, 909-922
- __call__(objective_vectors: numpy.ndarray, reference_point: numpy.ndarray) float | numpy.ndarray [source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.
- class scalarization.ASF.PointMethodASF(nadir: numpy.ndarray, ideal: numpy.ndarray, rho: float = 1e-06, rho_sum: float = 1e-06)[source]
Bases:
ASFBase
Implementation of the reference point based ASF.
- Parameters:
nadir (np.ndarray) – The nadir point.
ideal (np.ndarray) – The ideal point.
rho (float) – A small number to form the utopian point.
rho_sum (float) – A small number to be used as a weight for the sum term.
References
Miettinen, K. & Mäkelä, Marko M. Synchronous approach in interactive multiobjective optimization European Journal of Operational Research, 2006, 170, 909-922
- __call__(objective_vectors: numpy.ndarray, reference_point: numpy.ndarray)[source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.
- class scalarization.ASF.AugmentedGuessASF(nadir: numpy.ndarray, ideal: numpy.ndarray, index_to_exclude: List[int], rho: float = 1e-06, rho_sum: float = 1e-06)[source]
Bases:
ASFBase
Implementation of the augmented GUESS related ASF.
- Parameters:
nadir (np.ndarray) – The nadir point.
ideal (np.ndarray) – The ideal point.
index_to_exclude (List[int]) – The indices of the objective functions to be excluded in calculating the first term of the ASF.
rho (float) – A small number to form the utopian point.
rho_sum (float) – A small number to be used as a weight for the sum term.
References
Miettinen, K. & Mäkelä, Marko M. Synchronous approach in interactive multiobjective optimization European Journal of Operational Research, 2006, 170, 909-922
- __call__(objective_vectors: numpy.ndarray, reference_point: numpy.ndarray)[source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.
- class scalarization.ASF.GuessASF(nadir: numpy.ndarray)[source]
Bases:
ASFBase
Implementation of the naive or GUESS ASF.
- Parameters:
nadir (np.ndarray) – The nadir point of the problem being scalarized.
References
Miettinen, K., Mäkelä, M. On scalarizing functions in multiobjective optimization OR Spectrum 24, 193–213 (2002)
- __call__(objective_vectors: numpy.ndarray, reference_point: numpy.ndarray)[source]
Evaluate the ASF.
- Parameters:
objective_vectors (np.ndarray) – The objective vectors to calculate the values.
reference_point (np.ndarray) – The reference point to calculate the values.
- Returns:
- Either a single ASF value or a vector of
values if objective is a 2D array.
- Return type:
Union[float, np.ndarray]
Note
The reference point may not always necessarily be feasible, but it’s dimensions should match that of the objective vector.