Kernel-smoothed local standard deviation on standardised inputs.
Each input is divided by its standard deviation in the training data X before distances are computed, so bandwidth is measured in standard deviations and an input recorded in small units (e.g. metres) carries the same weight as one in large units (e.g. degrees). This mirrors the input scaling of the Kriging surrogate. The raw kernel is predict_local_std_fast.
Parameters
Name
Type
Description
Default
X
np.ndarray
Training inputs, shape (n,) or (n, d).
required
residuals
np.ndarray
Residual at each training point, length n.
required
X_eval
np.ndarray
Evaluation points, shape (m,) or (m, d).
required
bandwidth
float
Gaussian kernel bandwidth, in standard deviations; must be positive.
required
out
np.ndarray
Array of length m to write the result into. Defaults to None.
None
Returns
Name
Type
Description
np.ndarray
np.ndarray: Local standard deviation at each evaluation point, length m
np.ndarray
(out itself if given).
Raises
Name
Type
Description
ValueError
If bandwidth is not positive or residuals do not match X.