-
Notifications
You must be signed in to change notification settings - Fork 26
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
Heart rate data #199
base: main
Are you sure you want to change the base?
Heart rate data #199
Conversation
Thank you for your PR. Could you please explain what you added that wasn't available in SleepECG before? We already compute RRI, and based on that, we have implemented many different features (see https://sleepecg.readthedocs.io/en/stable/feature_extraction/). Regarding robustness, there is an ongoing discussion in #14, maybe you want to chime in there? |
Thanks for taking the time to review my pull request. In this update, I focused on enhancing the SleepECG package's capability to classify sleep stages using heart rate data (a heart rate with corresponding timestamp )when EEG signals are unavailable. Additionally, I addressed the robustness of the system by implementing code to handle missing data for extended periods. This improvement aims to ensure more reliable performance in real-world applications. Considering the ongoing discussion in #14 about robustness, I'll certainly try my best to chime in to contribute to the discourse and provide further insights into the implemented changes. Moreover, these enhancements were initially developed for a web-based project, but I made sure they are equally applicable for local deployments, thereby expanding the SleepECG package's usability scope . |
It looks like the main addition is an option to convert RRI back to time stamps, correct? I think this could be quite useful, but in order to integrate it into SleepECG, you should put it into a dedicated function. I'm not sure if it belongs to the Please remove your changes from @hofaflo WDYT? |
If I understand correctly, the input data would not be RR intervals, but an irregularly sampled heart rate. But I generally agree, a function which takes heart rate and corresponding timestamps as input and produces (estimated) heartbeat times which can then be used as input to the existing feature extraction functions would be a useful addition! |
Definitely! RRI is the inverse of the HR, so the function would support both measures. |
The idea for this usage came up as I was working on a current project. I analyze heart rate data gathered from smart bands, and I need to deploy it on the web using JSON files as input. Thanks for your review; I will make the changes you mentioned earlier (wrap it in dedicated function and delete changes in README.md) and ask for more help if it's possible. I also recommend checking a competition on Kaggle, which has a relatively useful topic. |
i have added HeartRateSleep function as last function in feature_extraction.py . |
I have introduced Changes to the SleepECG package, primarily focusing on enabling sleep stage classification using heart rate data when EEG signals are not available. Key features of this update include:
Heart Rate to R-Interval Conversion:
Implemented an algorithm to convert heart rate data into R-intervals. This crucial development allows the use of heart rate data, which is more readily available in many scenarios, for sleep stage classification. Handling Data Gaps:
Added robustness to the system by integrating code that effectively handles scenarios where data might be missing for extended periods. This ensures more reliable performance and resilience in real-world applications. Web-Based and Local Application:
Originally developed for a web-based project, these enhancements are equally applicable for local deployments, thereby broadening the usability scope of the SleepECG package.