pod.predict_local_std
predict_local_std(X, residuals, X_eval, bandwidth)Estimates the local standard deviation using Gaussian Kernel Smoothing.
This implements a Nadaraya-Watson estimator specifically for the squared residuals to model how noise varies across the input domain (heteroscedasticity).
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| X | np.ndarray | The source locations (original data inputs). | required |
| residuals | np.ndarray | The residuals observed at X. |
required |
| X_eval | np.ndarray | The target locations to estimate variance at. | required |
| bandwidth | float | The width of the Gaussian kernel (sigma). | required |
Returns
| Name | Type | Description |
|---|---|---|
| np.ndarray | np.ndarray: An array of standard deviation estimates corresponding to X_eval. |