pyinterp.fill.loess#
- pyinterp.fill.loess(data, config=None, *, nx=None, ny=None, max_iterations=None, epsilon=None, value_type=None, first_guess=None, is_periodic=None, num_threads=None)[source]#
Fill missing values using LOESS (locally weighted regression).
- Parameters:
data (_FloatArrayT) – 2D grid with missing values (NaN)
config (Loess | None) – Configuration object (if provided, keyword args are ignored)
nx (int | None) – Window size in X direction
ny (int | None) – Window size in Y direction
max_iterations (int | None) – Maximum number of iterations. If the value is 1, a single-pass LOESS is performed, the first guess option is ignored.
epsilon (float | None) – Convergence criterion
value_type (Literal['all', 'defined', 'undefined'] | None) – Which values to use in regression
first_guess (Literal['zero', 'zonal_average'] | None) – Initial guess method
is_periodic (bool | None) – Whether to assume periodic boundaries
num_threads (int | None) – Number of threads (0 = auto)
- Returns:
Filled grid
- Return type:
_FloatArrayT
Examples
>>> filled_grid = loess( ... data, nx=5, ny=5, max_iterations=10, value_type="defined" ... )