tungli / find_peaks-rs Goto Github PK
View Code? Open in Web Editor NEWFind (filtered) local maxima.
Find (filtered) local maxima.
Hi,
I'm using your library for technical analysis of the stock market and I use it for detection of local maxima/minima. Everything looks fine but I've detected several cases using with_min_distance in that the peaks returned are not the highest ones. In the image bellow you will see stock candles (white and blue) on a chart and the small blue triangles are the peaks returned by your library using win_min_distanance of 5.
As you can see the 3 biggest candles on the area were not marked as peaks/local maxima. Is this a bug?
Thanks.
Hi,
I'm using your library and I'm having cases in that I get an error using with_min_distance().
let mut local_minima_fp = PeakFinder::new(&data); // a Vec<f64>
local_minima_fp.with_min_prominence(4.764600000000001);
local_minima_fp.with_min_distance(20);
This is the error message:
thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /Users/pmagaz/.cargo/registry/src/github.com-1ecc6299db9ec823/find_peaks-0.1.2/src/lib.rs:285:23
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Taking a quick look at the code, it looks like peaks variable could have no elements, therefore peaks[0] could be the reason?
let mut filtered = Vec::with_capacity(peaks.len());
filtered.push(peaks[0].clone());
Thanks in advance!
Hi thanks for the lib! I wonder whether it is ready for production?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.