function.mo.mo_conv2_max

function.mo.mo_conv2_max(X)

Convex bi-objective maximization test function (2 objectives).

A smooth, convex two-objective maximization problem on [0, 1]^2 using flipped versions of the minimization objectives: f1(x, y) = 2 - (x^2 + y^2) f2(x, y) = 2 - ((1 - x)^2 + (1 - y)^2)

Properties

  • Domain: [0, 1]^2
  • Objectives: maximize both f1 and f2
  • Ideal points: (0, 0) for f1 (gives f1=2); (1, 1) for f2 (gives f2=2)
  • Pareto set: line x = y in [0, 1]
  • Pareto front: convex quadratic trade-off f1 = 2 - 2t^2, f2 = 2 - 2(1 - t)^2, t ∈ [0, 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 exactly 2 dimensions. required

Returns

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

Raises

Name Type Description
ValueError If X does not have exactly 2 dimensions.

Note

  • Number of objectives: 2
  • Number of variables: 2
  • Search domain: [0, 1]^2
  • Ideal points: (1, 1) for f1, (0, 0) for f2
  • Pareto front: Convex, quadratic
  • Problem type: Maximization
  • Characteristics: Convex, smooth, bounded

Examples

Single point evaluation:

>>> from spotoptim.function.mo import mo_conv2_max
>>> import numpy as np
>>> X = np.array([0.0, 0.0])
>>> result = mo_conv2_max(X)
>>> result.shape
(1, 2)
>>> result[0]  # f1 maximum
array([0., 2.])
>>> X = np.array([1.0, 1.0])
>>> result = mo_conv2_max(X)
>>> result[0]  # f2 maximum
array([2., 0.])

Multiple points evaluation:

>>> X = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> result = mo_conv2_min(X)
>>> result.shape
(3, 2)
>>> result[1]  # Pareto front
array([0.5, 0.5])