function.mo.dtlz2
function.mo.dtlz2(X, n_obj=3)DTLZ2 multi-objective test function (scalable objectives).
DTLZ2 is a scalable test problem with a concave Pareto front (a unit sphere).
Mathematical formulation
f_i(X) = [1 + g(X)] * cos(x1 * π/2) * … * cos(x_{M-i} * π/2) * sin(x_{M-i+1} * π/2) f_M(X) = [1 + g(X)] * sin(x1 * π/2) g(X) = sum((x_i - 0.5)^2 for i in X_M)
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| X | array - like |
Input points with shape (n_samples, n_features) or (n_features,). Can be a 1D array for a single point or 2D array for multiple points. | required |
| n_obj | int | Number of objectives. Defaults to 3. Must be at least 2 and at most n_features. | 3 |
Returns
| Name | Type | Description |
|---|---|---|
| np.ndarray | np.ndarray: Objective values with shape (n_samples, n_obj). |
Raises
| Name | Type | Description |
|---|---|---|
| ValueError | If n_obj is invalid or X has insufficient dimensions. |
Note
- Number of objectives: Scalable (typically 3)
- Typical number of variables: n_obj + k - 1 (often k = 10, so n = 12 for 3 objectives)
- Search domain: [0, 1]^n
- Pareto front: Concave (sphere: sum(f_i^2) = 1)
- Characteristics: Concave, unimodal
Examples
>>> from spotoptim.function.mo import dtlz2
>>> import numpy as np
>>> X = np.array([0.5, 0.5, 0.5, 0.5, 0.5])
>>> result = dtlz2(X, n_obj=3)
>>> result.shape
(1, 3)References
Deb, K., Thiele, L., Laumanns, M., & Zitzler, E. (2005). “Scalable test problems for evolutionary multiobjective optimization.” In Evolutionary multiobjective optimization (pp. 105-145). Springer.