TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: How to detect the three bursts in this data

3 点作者 jetpm将近 10 年前
I have this accelerometer data from my phone: http:&#x2F;&#x2F;imgur.com&#x2F;a&#x2F;cJoJH<p>The first artifact is when I lifted my phone from the table, the 3 bursts in the middle when I tapped on my phone 3 times and the last artifact when I placed it on the table again.<p>I want to detect the 3 taps in the middle algorithmically and ignore the other things.<p>I already have some working code that relies on thresholds, and another version that looks for high peaks followed by smaller peaks within a window.<p>But I think there should be a more reliable solutions to solve this, I assume this is a somewhat common problem. I also played around with FFT and power spectrums a little bit but I am not really satisfied. Maybe I should train a neural network or another machine learning algorithm?<p>How would you solve that?

4 条评论

fundamental将近 10 年前
So, from the second figure you can see that you have a series of decaying envelopes. For the individual taps you should be able to model this as some event at an unknown scale with an apriori rate of decay. You can easily discard the non-activity regions based upon some windowed estimates of the energy. That leaves you with what&#x27;s essentially a template matching type of problem for each of the three areas where the signal is showing above noise levels of activity. The first and last region don&#x27;t match the decaying exponential well and the middle one matches it fairly well with 3 distinct events.<p>That said, this approach introduces what may be more latency, coding complexity, and computational work than is desired. I&#x27;d take a look at a spectrogram and see if there&#x27;s some bandpass filter which makes it easier to see these events compared to the &#x27;false activity&#x27;.
huac将近 10 年前
hn may not be the best place to ask this question.<p>a neural network is almost certainly overkill, and likely too slow for your purposes. you probably want some additional smoothing. i don&#x27;t know why FFT doesn&#x27;t work for you, since this accelerometer data can almost certainly be decomposed properly.<p>a window-based threshold approach is fine in my opinion as well.
creyes123将近 10 年前
It sounds like a good solution might be a Markov Chain Monte Carlo method. A lot harder to explain than to implement.
vshan将近 10 年前
Could this possibly be solved using derivatives?