plotting.plot_signal_model

plot_signal_model(
    X,
    y,
    X_eval,
    mean_curve,
    threshold,
    local_std=None,
    poi_name='Parameter of Interest',
    ax=None,
)

Diagnostic Plot 1: Signal vs Parameter of Interest (The Physics).

Visualizes the raw simulation data, the fitted mean model, and the detection threshold. Equivalent to Figure 6/12 in the Generalized Method paper.

Parameters

Name Type Description Default
X np.ndarray The raw PoI. required
y np.ndarray The raw signal responses. required
X_eval np.ndarray The grid of points used for the curves. required
mean_curve np.ndarray The predicted mean response at X_eval. required
threshold float The detection threshold (horizontal line). required
local_std Optional[np.ndarray] (Optional) The predicted standard deviation at X_eval. If provided, adds 95% prediction bounds to show noise structure. None
ax Optional[plt.Axes] (Optional) Matplotlib axes to plot on. Creates new if None. None

Examples

import matplotlib.pyplot as plt

# Plot the physics model
ax = plot_signal_model(
    X, y, X_eval, mean_curve,
    threshold=3.0,
    local_std=std_curve,
    poi_name="Crack Length (mm)"
)
plt.show()