Savitzky–Golay filter in Java.
Code ported from https://github.com/pconstantinou/savitzkygolay
Available at Maven Central.
dependencies {
implementation("io.vacco.savitzky-golay:savitzky-golay:<LATEST_VERSION>")
}
This code is based on the article: Smoothing and Differentiation of Data by Simplified Least Squares Procedures
Provides an effective way of smoothing data that generally follows curves found in polynomials.
It is particularly good alternative to a moving average since it does not introduce a delay proportional to about half the window length.
The filter runs on O(number of elements * size of window)
.
See test case for usage example.
Render plot in eCharts.