function.mo.zdt2

function.mo.zdt2(X)

ZDT2 multi-objective test function (2 objectives).

ZDT2 is similar to ZDT1 but has a non-convex Pareto front.

Mathematical formulation

f1(X) = x1 f2(X) = g(X) * [1 - (x1 / g(X))^2] g(X) = 1 + 9 * sum(x_i for i=2 to n) / (n - 1)

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. Must have at least 2 dimensions. required

Returns

Name Type Description
np.ndarray np.ndarray: Objective values with shape (n_samples, 2) where: - Column 0: f1 values - Column 1: f2 values

Raises

Name Type Description
ValueError If X has fewer than 2 dimensions.

Note

  • Number of objectives: 2
  • Typical number of variables: 30
  • Search domain: [0, 1]^n
  • Pareto front: Non-convex, f1 ∈ [0, 1], f2 = 1 - f1^2
  • Characteristics: Non-convex, unimodal

Examples

>>> from spotoptim.function.mo import zdt2
>>> import numpy as np
>>> X = np.array([0.0, 0.0, 0.0])
>>> result = zdt2(X)
>>> result.shape
(1, 2)

References

Zitzler, E., Deb, K., & Thiele, L. (2000). “Comparison of multiobjective evolutionary algorithms: Empirical results.” Evolutionary computation, 8(2), 173-195.