pod.compute_kriging_group_loo_means

compute_kriging_group_loo_means(gpr, X_2d, y, groups)

Leave-one-group-out Kriging means, for data that contains repeated points.

Each group (e.g. all copies of one original observation in a bootstrap resample) is removed together, so a point is never predicted from its own duplicate. With I the indices of a group and B as in compute_kriging_loo_residuals, the prediction is mu_{-I} = -(B_II)^-1 B_{I,rest} y_rest, the block form used by [UQLab] uq_Kriging_calc_KFold. It reduces to [M26] Eq. 10 when every group has one member.

Parameters

Name Type Description Default
gpr GaussianProcessRegressor A fitted Kriging model. required
X_2d np.ndarray Training inputs (N_samples, N_features). required
y np.ndarray Training responses (N_samples,). required
groups np.ndarray Integer group label per sample. required

Returns

Name Type Description
np.ndarray np.ndarray: The leave-one-group-out mean for every sample, in response units.