plotting.plot_kriging_diagnostics
plot_kriging_diagnostics(
std_residuals,
outlier_scale_factor=1.0,
best_kernel_name='Matérn 5/2',
ax=None,
)Diagnostic Plot: Visualizes Standardized LOO Residuals and Outlier Calibration.
Plots a histogram of standardized LOO residuals e_i against the Standard Normal distribution N(0, 1) alongside a scatter plot against the [-3, 3] outlier threshold bounds. Equivalent to Figure 10 in Malkiel et al. (2026).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| std_residuals | np.ndarray | Array of standardized LOO residuals e_i. | required |
| outlier_scale_factor | float | Outlier scaling factor gamma. Defaults to 1.0. | 1.0 |
| best_kernel_name | str | Name of the selected Kriging kernel. Defaults to “Matérn 5/2”. | 'Matérn 5/2' |
| ax | Optional[plt.Axes] | Matplotlib axes to plot on. Defaults to None. | None |
Returns
| Name | Type | Description |
|---|---|---|
| plt.Axes | plt.Axes: The configured Matplotlib axis containing the plot. |
Examples
import numpy as np
import matplotlib.pyplot as plt
from digiqual.plotting import plot_kriging_diagnostics
std_res = np.random.normal(0, 1, 50)
ax = plot_kriging_diagnostics(std_res, outlier_scale_factor=1.2, best_kernel_name="Matérn 5/2")
plt.show()