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

Inconsistent signal_interpolate methods in ppg_quality() #1043

Open
athatcher13 opened this issue Oct 25, 2024 · 1 comment
Open

Inconsistent signal_interpolate methods in ppg_quality() #1043

athatcher13 opened this issue Oct 25, 2024 · 1 comment

Comments

@athatcher13
Copy link

Describe the bug
ppg_quality with method=

  • 'templatematch': _ppg_quality_templatematch() uses signal_interpolate with method='quadratic'
  • 'disimilarity': _ppg_quality_disimilarity() uses signal_interpolate with method='previous'

Expected behaviour
I would expect this behavior to be consistent between ppg_quality methods. method='previous' seems most apt as the quality is truly calcuated beat-by-beat - it will hold the most recent beat's quality value until a new value comes along to replace it. method='quadratic' frequently fills the vector with values above and below the specified 'templatematch' range of [0, 1].

System Specifications

  • OS: Windows (WindowsPE 64bit)
  • Python: 3.11.9
  • NeuroKit2: 0.2.10
  • NumPy: 2.1.2
  • Pandas: 2.2.3
  • SciPy: 1.14.1
  • sklearn: 1.5.2
  • matplotlib: 3.9.2
Copy link

welcome bot commented Oct 25, 2024

Hi 👋 Thanks for reaching out and opening your first issue here! We'll try to come back to you as soon as possible. ❤️ kenobi

athatcher13 added a commit to athatcher13/NeuroKit that referenced this issue Oct 25, 2024
Addressing issue neuropsychology#1043
Change 'templatematch' implementation to use interpolation method 'previous' rather than 'quadratic'. This aligns it with the 'disimilarity' implementation and is a better representation of the beat-by-beat nature of the quality measure.
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

1 participant