Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
ml-savitzky-golay-generalized
Advanced tools
General Least-Squares Smoothing and Differentiation by the Convolution (Savitzky-Golay) Method Peter A. Gorry
Pretty much the same as the savitzky-golay method, but without border problems, and without inventing points. It can be maybe merged into the savitzky-golay project but by the now this is the version used in the last GSD project.
I'll try an automatic parameter tunning based on the SNR or in the entropy of the signal.
´´´ var SG = require("savitzky-golay-generalized"); ´´´
´´´ var options = { windowSize: 15, derivative: 0, polynomial: 3 };
var noiseLevel = 0.1; var data = new Array(200); for (var i = 0; i < data.length; i++) data[i] = Math.sin(iMath.PI2/data.length)+(Math.random()-0.5)noiseLevel; var ans = SG(data, Math.PI2/data.length, options); console.log(ans); ´´´
´´´ var options = { windowSize: 47, derivative: 1, polynomial: 3 };
var noiseLevel = 0.1; var data = new Array(200); for (var i = 0; i < data.length; i++) data[i] = Math.sin(iMath.PI2/data.length)+(Math.random()-0.5)noiseLevel; var ans = SG(data, Math.PI2/data.length, options); console.log(ans);
´´´
´´ var options = { windowSize: 47, derivative: 1, polynomial: 3 };
var noiseLevel = 0.1; var data = new Array(200); var x = new Array(200); for (var i = 0; i < data.length; i++){ data[i] = Math.sin(iMath.PI2/data.length)+(Math.random()-0.5)noiseLevel; x[i]=iMath.PI*2/data.length; }
var ans = SG(data, Math.PI*2/data.length, options); var ans2 = SG(data, x, options);
/for (var j = 0; j < data.length; j++){ console.log(ans[j]+" "+ans2[j]); }/ /* The result should be the approximately the same for (var j = Math.round(options.windowSize/2); j < data.length-Math.round(options.windowSize/2); j++){ ans[j].should.be.approximately(ans2[j], 10e-10); } */ ´´´
FAQs
Savitzky–Golay filter in Javascript
The npm package ml-savitzky-golay-generalized receives a total of 907 weekly downloads. As such, ml-savitzky-golay-generalized popularity was classified as not popular.
We found that ml-savitzky-golay-generalized demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.