predict_local_std_fast
predict_local_std_fast(X, residuals, X_eval, bandwidth, out=None)
High-performance Nadaraya-Watson kernel smoothing for local standard deviation.
Uses C++ multi-threading if compiled, or vectorized NumPy array operations if not.
Parameters
| 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 the units of X; must be positive. |
required |
| out |
np.ndarray |
Array of length m to write the result into. Defaults to None. |
None |
Returns
|
np.ndarray |
np.ndarray: Local standard deviation at each evaluation point, length m |
|
np.ndarray |
(out itself if given). |
Raises
|
ValueError |
If bandwidth is not positive or residuals do not match X. |