Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-savitzky-golay-generalized

Package Overview
Dependencies
Maintainers
6
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-savitzky-golay-generalized - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

History.md

4

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc