ig248 / pyampd Goto Github PK
View Code? Open in Web Editor NEWAn improved Python implementation of the Automatic Multiscale Peak Detection algorithm
License: MIT License
An improved Python implementation of the Automatic Multiscale Peak Detection algorithm
License: MIT License
Hi, @ig248 ,
I read the original paper and compared it with your implementation, I am wondering why below code reshapes LSM matrix by LSM[0:l_scale, :]
but not by LSM[0:l_scale+1, :]
?
Line 106 in cd24703
As the paper said, it reshapes the LSM matrix by removing all elements m_{k,i} for which k > λ holds. So it should lead to new λ ×N matrix. But in your implementation, the new matrix is (λ-1) ×N.
And under certain dataset, the l_scale
may equals to 0, then LSM[0:0]
will throw an exception...
Looking forward to your response
I wanted to run the script on my data but always got the error
"ValueError: zero-size array to reduction operation minimum which has no identity" in line 107 of ampd.py
The issue is that the largest value in G (for my data) is the first one and thus
l_scale = np.argmax(G)
leads to l_scale = 0
In line 107 the array LSM is reduced to
LSM[0:l_scale, :]
But as l_scale = 0 this leads to an empty array and an error when trying to to use np.min on it.
I think line 107 should be
pks_logical = np.min(LSM[0:l_scale+1, :], axis=0)
Love the performance of this library for my time series analysis project, I would love to use it for my micropython or circuitpython projects (ESP32, Teensy and Arduino) and I think it perfectly complements upcoming egde ML tool chains from Nvidia-ARM and TinyML.
Thank you!
as the title suggests
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.