Description
A proper discription for the usage of Savitzky Golay filter is missing in the official documentation. The example looks good, but usage, parameter description, and parameter usage should be explained. Use [1] and [2] as inspiration. [1] should be referenced in the docs. Requires knowledge regarding polynomial regression.
- Of course you can also start writing the tutorial/documentation in this issue/markdown files/scripts and afterwards we try to incorporate into the library.
References
- [1] https://fslab.org/blog/posts/savitzky-golay-temperature.html#Savitzky-Golay-filter
- [2]
|
/// Smooth (and optionally differentiate) data with a Savitzky-Golay filter. |
|
/// The Savitzky-Golay filter is a type of low-pass filter and removes high frequency noise from data. |
|
// Parameters |
|
// ---------- |
|
// data : array_like, shape (N,) |
|
// the values of the time history of the signal. |
|
// windowSize : int |
|
// the length of the window. Must be an odd integer number. |
|
// order : int |
|
// the order of the polynomial used in the filtering. |
|
// Must be less then `windowSize` - 1. |
|
// deriv: int |
|
// the order of the derivative to compute (default = 0 means only smoothing) |
|
// |
|
// The Savitzky-Golay is a type of low-pass filter, particularly suited for smoothing noisy data. |
|
// The main idea behind this approach is to make for each point a least-square fit with a |
|
// polynomial of high order over a odd-sized window centered at the point. |
|
let savitzkyGolay (windowSize:int) (order:int) deriv rate (data:float[]) = |
Description
A proper discription for the usage of Savitzky Golay filter is missing in the official documentation. The example looks good, but usage, parameter description, and parameter usage should be explained. Use [1] and [2] as inspiration. [1] should be referenced in the docs. Requires knowledge regarding polynomial regression.
References
FSharp.Stats/src/FSharp.Stats/Signal/Filtering.fs
Lines 44 to 61 in 8fb5d6d