sampling.mm.propose_mmphi_intensive_minimizing_point

sampling.mm.propose_mmphi_intensive_minimizing_point(
    X,
    n_candidates=1000,
    q=2.0,
    p=2.0,
    seed=None,
    lower=None,
    upper=None,
    normalize_flag=False,
)

Propose a new point that, when added to X, minimizes the intensive Morris-Mitchell (mmphi_intensive) criterion.

Parameters

Name Type Description Default
X np.ndarray Existing points, shape (n_points, n_dim). required
n_candidates int Number of random candidates to sample. 1000
q float Exponent for mmphi_intensive. 2.0
p float Distance norm for mmphi_intensive. 2.0
seed int Random seed. None
lower np.ndarray Lower bounds for each dimension (default: 0). None
upper np.ndarray Upper bounds for each dimension (default: 1). None
normalize_flag bool If True, normalizes the X array and candidate points before computing distances. Defaults to False. False

Returns

Name Type Description
np.ndarray np.ndarray: Proposed new point, shape (1, n_dim).

Examples

>>> import numpy as np
    from spotoptim.sampling.mm import propose_mmphi_intensive_minimizing_point
    # Existing design with 3 points in 2D
    X = np.array([[1.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
    # Propose a new point
    new_point = propose_mmphi_intensive_minimizing_point(X, n_candidates=500, q=2, p=2, seed=42)
    print(new_point)
    # plot the existing points and the new proposed point
    import matplotlib.pyplot as plt
    plt.scatter(X[:, 0], X[:, 1], color='blue', label='Existing Points')
    plt.scatter(new_point[0, 0], new_point[0, 1], color='red', label='Proposed Point')
    plt.legend()
    # add grid and labels
    plt.grid()
    plt.title('MM-PHI Proposed Point')
    plt.xlabel('X1')
    plt.ylabel('X2')
    plt.show()