ml-savitzky-golay-generalized
Advanced tools
Comparing version 1.0.3 to 1.0.4
{ | ||
"name": "ml-savitzky-golay-generalized", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "Savitzky–Golay filter in Javascript", | ||
@@ -41,4 +41,4 @@ "main": "src/index.js", | ||
"extend": "^3.0.0", | ||
"ml-stat":"1.1.0" | ||
"ml-stat": "^1.3.3" | ||
} | ||
} |
@@ -8,3 +8,24 @@ # savitzky-golay-generalized | ||
I'll try an automatic parameter tunning based on the SNR or in the entropy of the signal. | ||
#Usage | ||
```js | ||
npm i ml-savitzky-golay-generalized | ||
const SG = var SG = require("ml-savitzky-golay-generalized"); | ||
SG(dataY, deltaX|X, options) | ||
``` | ||
##Parameters | ||
### dataY | ||
The data to be filtered. | ||
###deltaX | X | ||
deltaX specifies the difference between 2 consecutive points of the independent: deltaX = X[i+1] - X[i]. Specficiying a deltaX suppose that all your points are equally spaced on the independent variable. | ||
If your points are not equally spaced in the ordinate variable, then you have to provide explicitelly your X values. The algorithm will use the average deltaX within each bin of 'windowSize' points to approximate the derivatives. This fast approximation only works if the X is almost locally equally spaced. | ||
###options | ||
####windowSize: | ||
The odd number of points to approximate the regresion polynomial. Default 9 | ||
####derivative: | ||
The grade of the derivative. 0 by defualt(Smoothing) | ||
####polynomial: | ||
The order of the regresion polynomial. Default 3 | ||
## Examples | ||
@@ -11,0 +32,0 @@ |
@@ -6,5 +6,5 @@ //Code translate from Pascal source in http://pubs.acs.org/doi/pdf/10.1021/ac00205a007 | ||
var defaultOptions = { | ||
windowSize: 11, | ||
windowSize: 9, | ||
derivative: 0, | ||
polynomial: 2, | ||
polynomial: 3, | ||
}; | ||
@@ -11,0 +11,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12847
8
99
1
+ Addedml-stat@1.3.3(transitive)
- Removedml-stat@1.1.0(transitive)
Updatedml-stat@^1.3.3