function.mo.mo_conv2_min
function.mo.mo_conv2_min(X)Convex bi-objective minimization test function (2 objectives).
A smooth, convex two-objective problem on [0, 1]^2: f1(x, y) = x^2 + y^2 f2(x, y) = (x - 1)^2 + (y - 1)^2
Properties
- Domain: [0, 1]^2
- Objectives: minimize both f1 and f2
- Ideal points: (0, 0) for f1; (1, 1) for f2
- Pareto set: line x = y in [0, 1]
- Pareto front: convex quadratic trade-off f1 = 2t^2, f2 = 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 minimized) - Column 1: f2 values (to be minimized) |
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: (0, 0) for f1, (1, 1) for f2
- Pareto front: Convex, quadratic
- Problem type: Minimization
- Characteristics: Convex, smooth, bounded
Examples
Single point evaluation:
>>> from spotoptim.function.mo import mo_conv2_min
>>> import numpy as np
>>> X = np.array([0.0, 0.0])
>>> result = mo_conv2_min(X)
>>> result.shape
(1, 2)
>>> result[0] # f1 minimum
array([0., 2.])>>> X = np.array([1.0, 1.0])
>>> result = mo_conv2_min(X)
>>> result[0] # f2 minimum
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])