Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to smooth data #59

Open
connormeaton opened this issue Aug 20, 2020 · 2 comments
Open

How to smooth data #59

connormeaton opened this issue Aug 20, 2020 · 2 comments

Comments

@connormeaton
Copy link

When plotting the output from your program, it produces a waveform like this:

Screen Shot 2020-08-20 at 10 51 39 AM

I understand this output is more sensitive than an on-finger bpm reader, but with a little imagination the waveform looks similar to what is produced by my on device, like this:

Screen Shot 2020-08-20 at 10 54 13 AM

The waveform on the pulse reader is ultimately transformed to give 1 value as the bpm. Any idea how this transformation is completed? In other words, how do I transform the output from your model to give a reliable, stable bpm? I've tried aggregating at varying levels (1 sec, 2 sec, etc.) with different statistics (mean, min, max, mode), but these values rarely match my on-finger device.

The closest your model gets to my on-finger device is at the local minima on the waveforms. Is this the value I should select for?

Thanks!

@keyan
Copy link

keyan commented Sep 2, 2020

@cmeaton I would suggest reading up on digital signal processing. This task seems well suited to an application of the Kalman filter.

e.g. https://scipy-cookbook.readthedocs.io/items/KalmanFiltering.html

@connormeaton
Copy link
Author

@keyan IIUC, the Kalman filter estimates smoothed data by considering observed data and an a prior model. What I don't understand is how to determine the a priori model in this case. Is it a manually-defined expected range of values, or something determined statistically?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants