I have an alternative implementation of this same algorithm, (https://github.com/mljs/savitzky-golay-generalized) and we should merge. I implemented some features that allows to use in a more general way than the current one. I list the features:
It gives the same number of points as the input function without "padding" options. It uses the general definition of the Savitzky-Golay to deal with the border points.
It accepts non equally spaced x vectors. Although this is just an approximation to the real solution, the algorithm speed is not affected that much, by considering the local changes of X within the windowSize as a constant. It is demonstrated that induced error is smaller than the error induced by the noise in the Y dimention. In cases of big changes in delta x, the approximation push down the derivatives to 0. Which is very casually correct.
@mljs/collaborators
I have an alternative implementation of this same algorithm, (https://github.com/mljs/savitzky-golay-generalized) and we should merge. I implemented some features that allows to use in a more general way than the current one. I list the features: