mljs / savitzky-golay

Savitzky–Golay filter
https://mljs.github.io/savitzky-golay/modules.html
MIT License
34 stars 1 forks source link

reconsider default values #16

Open targos opened 8 years ago

targos commented 8 years ago

Current default values are not intuitive. The SG function is first a smoothing algorithm and should behave like this if the derivative option is not entered. See https://github.com/mljs/savitzky-golay/issues/15

maasencioh commented 8 years ago

@targos , you are right, it's a smoothing algorithm, but the usual application is for derivatives

maasencioh commented 8 years ago

@mljs/collaborators what should we do with this?, I think that the default value should be the first derivative.

andcastillo commented 8 years ago

The default value should be 0. In principle it is intended to smooth the function, but S-G extended it to approach derivatives as well. I don't think there is a preferred derivative order. It will depend on the application.