sampling.mm.mmphi_intensive_update

sampling.mm.mmphi_intensive_update(
    X,
    new_point,
    J,
    d,
    q=2.0,
    p=2.0,
    normalize_flag=False,
)

Updates the Morris-Mitchell intensive criterion for n+1 points by adding a new point to the design. This should be more efficient than recalculating the metric from scratch, because it only needs to compute the distances between the new point and the existing points.

Parameters

Name Type Description Default
X np.ndarray Existing sampling plan (shape: (n, d)). required
new_point np.ndarray New point to add (shape: (d,)). required
J np.ndarray Multiplicities of distances for the existing design. required
d np.ndarray Unique distances for the existing design. required
q float Exponent used in the computation of the Morris-Mitchell metric. Defaults to 2.0. 2.0
p float Distance norm to use (e.g., p=1 for Manhattan, p=2 for Euclidean). Defaults to 2.0. 2.0
normalize_flag bool If True, normalizes the X array and the new_point before computing distances. Defaults to False. False

Returns

Name Type Description
tuple[float, np.ndarray, np.ndarray] tuple[float, np.ndarray, np.ndarray]: Updated intensive_phiq, updated_J, updated_d.

Examples

>>> import numpy as np
>>> from spotoptim.sampling.mm import mmphi_intensive_update
>>> # Existing design with 3 points in 2D
>>> X = np.array([[0.0, 0.0], [0.5, 0.5], [1.0, 1.0]])
>>> phiq, J, d = mmphi_intensive(X, q=2, p=2)
>>> # New point to add
>>> new_point = np.array([0.1, 0.1])
>>> # Update the intensive criterion
>>> updated_phiq, updated_J, updated_d = mmphi_intensive_update(X, new_point, J, d, q=2, p=2)