Skip to content

OTH: Update loess#84

Merged
derb12 merged 6 commits into
developmentfrom
update_loess
Jun 7, 2026
Merged

OTH: Update loess#84
derb12 merged 6 commits into
developmentfrom
update_loess

Conversation

@derb12

@derb12 derb12 commented Jun 7, 2026

Copy link
Copy Markdown
Owner

Description

Updates loess as follows:

  • allows a custom noise sigma function to perform Ruckstuhl's robust extraction of baseline signal method
    • also now guards against a noise sigma value of 0
  • is more robust against windows with too few non-zero weights
    • the check for each window makes it ~10% slower than before this PR; could probably offset the slowdown by solving low polynomial orders (<2) by directly using the hat matrix in a follow up, but need to see how the numerical stability is affected. Doesn't matter a ton since delta can just be increased
  • allows masking for loess as a follow up to PR ENH: Add masking support for many algorithms #83 to address issue ENH/RFC: Add masking #72
  • deprecates conserve_memory and instead just always calculates the distance kernels each iteration

Type of Pull Request

  • Bug Fix
  • New Feature
  • Miscellaneous Changes (refactor, code improvements, etc.)
  • Documentation or Example Programs

Pull Request Checklist

  • New code and/or documentation is valid for use with the BSD 3-clause license.
  • New code is fully documented with docstrings that follow Numpy style,
    if applicable.
  • New code follows PEP 8 standards as closely as possible, if applicable.
  • Added/updated tests and ensured they pass locally, if applicable.
  • Verified that documentation builds locally, if applicable.

@derb12

derb12 commented Jun 7, 2026

Copy link
Copy Markdown
Owner Author

test_polynomial.py::TestLoess::test_zero_sigma_exits_2 seems flaky; originally failed for 3.10, 3.11, and 3.13; rerunning then passes. Should either mark it as xfail or just remove it since test_polynomial.py::TestLoess::test_zero_sigma_exits does the same check; will do after merging since it's not worth another full CI run.

@derb12 derb12 merged commit 3ba8fac into development Jun 7, 2026
32 of 38 checks passed
@derb12 derb12 deleted the update_loess branch June 7, 2026 18:51
@derb12 derb12 mentioned this pull request Jun 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant