Skip to content

Update to hspline and lowess filters.#69

Open
talensgj wants to merge 8 commits into
hippke:masterfrom
talensgj:update-filters
Open

Update to hspline and lowess filters.#69
talensgj wants to merge 8 commits into
hippke:masterfrom
talensgj:update-filters

Conversation

@talensgj
Copy link
Copy Markdown

Hello,

I've made some modifications to the hspline and lowess filters, specifically:

hspline

  • Add StandardScaler to improve stability.
  • Call HuberRegressor with max_iter=1000 to improve stability/convergence.
  • Expose HuberRegressor epsilon through cval.

lowess

  • Change the way the left and right indices of the window are computed to use np.searchsorted, fixing a bug.
  • Simplify calc_x_weights, by changing y_weights intilisation.
  • Expose the y_weight cut-off through cval.

I hope you will find these changes make sense and merge them into wotan.

@hippke
Copy link
Copy Markdown
Owner

hippke commented May 13, 2026

Hi, Thank you for your proposed changes! For each of them I have some questions. Let's start with the easiest ones:
Why change cval = 1.35 to cval = 3 in hspline, i.e. why choose this specific value? The default numbers were chosen in alignment with the reference papers.

@talensgj
Copy link
Copy Markdown
Author

@hippke I used cval=3 in my work, because in my tests cval=1.35 seemed a bit aggressive. The current state of the PR still has the value at cval=1.35, I have merely made it so the user can change it if they want.

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.

2 participants