function.mo.zdt4

function.mo.zdt4(X)

ZDT4 multi-objective test function (2 objectives).

ZDT4 has 21^9 local Pareto fronts, testing the algorithm’s ability to deal with multimodality.

Mathematical formulation

f1(X) = x1 f2(X) = g(X) * [1 - sqrt(x1 / g(X))] g(X) = 1 + 10 * (n - 1) + sum(x_i^2 - 10 * cos(4 * π * x_i) for i=2 to n)

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: 10
  • Search domain: x1 ∈ [0, 1], x_i ∈ [-5, 5] for i = 2, …, n
  • Pareto front: Convex, same as ZDT1
  • Characteristics: Multimodal (many local fronts)

Examples

>>> from spotoptim.function.mo import zdt4
>>> import numpy as np
>>> X = np.array([0.5, 0.0, 0.0])
>>> result = zdt4(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.