sampling.mm.plot_mmphi_corrected_vs_points

sampling.mm.plot_mmphi_corrected_vs_points(
    X_base,
    x_min,
    x_max,
    p_min=10,
    p_max=100,
    p_step=10,
    n_repeats=5,
    q=2.0,
    p_norm=2.0,
    figsize=(10, 6),
)

Plot the Corrected Morris-Mitchell Criterion versus the number of added points.

For each point count in range(p_min, p_max + 1, p_step) a set of uniformly random points is appended to X_base and the corrected criterion hat_Phi_q is evaluated on the extended design. This is repeated n_repeats times per point count to capture stochastic variability. The resulting mean ± std curve is compared to the baseline criterion of X_base alone.

Unlike plot_mmphi_vs_points, which uses the intensive criterion (normalized by M = n(n-1)/2), this function uses the corrected criterion (normalized by n^{1+q/k}), which is asymptotically size-invariant and therefore provides a more reliable comparison across designs of different sizes.

Parameters

Name Type Description Default
X_base np.ndarray Base design matrix of shape (n, k). required
x_min np.ndarray Lower bounds for each dimension, shape (k,). required
x_max np.ndarray Upper bounds for each dimension, shape (k,). required
p_min int Minimum number of points to add. Defaults to 10. 10
p_max int Maximum number of points to add. Defaults to 100. 100
p_step int Step size for the number of added points. Defaults to 10. 10
n_repeats int Number of repetitions per point count. Defaults to 5. 5
q float Exponent q for the corrected Morris-Mitchell criterion. Defaults to 2.0. 2.0
p_norm float Distance norm p. Defaults to 2.0. 2.0
figsize tuple Size of the plot (width, height). Defaults to (10, 6). (10, 6)

Returns

Name Type Description
pd.DataFrame pd.DataFrame: Summary DataFrame with columns n_points,
pd.DataFrame (mmphi_corrected, mean), and (mmphi_corrected, std) for each
pd.DataFrame number of added points.

Examples

>>> import numpy as np
>>> from spotoptim.sampling.mm import plot_mmphi_corrected_vs_points
>>> X_base = np.array([[0.1, 0.2], [0.4, 0.5], [0.7, 0.8]])
>>> x_min = np.array([0.0, 0.0])
>>> x_max = np.array([1.0, 1.0])
>>> df_summary = plot_mmphi_corrected_vs_points(X_base, x_min, x_max, p_min=10, p_max=50, p_step=10, n_repeats=3)