Coder Social home page Coder Social logo

Comments (15)

paulvangentcom avatar paulvangentcom commented on July 30, 2024

Please provide the full code and data set you're using. There's little I can do with just this info

-Paul

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

paulvangentcom avatar paulvangentcom commented on July 30, 2024

Can you share the .py file? I cannot see the images. Don't know what set the 'same dataset' is

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

paulvangentcom avatar paulvangentcom commented on July 30, 2024

Thanks, will have a look over the weekend.

-Paul

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

paulvangentcom avatar paulvangentcom commented on July 30, 2024

Ah you're using that example smartwatch dataset. Be aware that the data is very intermittent (some sections contain data, some do not), see the whole plot here:

smartwatchppg

You would need to write some code to exclude sections where no signal is present, and only run the analysis on sections where there's a signal present (the exception you're getting is telling you there's no signal). There's an example of how you might approach this task at the end of that same notebook, but by no means is that the only approach possible.

Alternative is collecting some of your own data using a smartwatch or ppg sensor.

Cheers,
Paul

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

paulvangentcom avatar paulvangentcom commented on July 30, 2024

Good luck, let me know if you need further assistance. Closing this for now.

Cheers,
Paul

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

paulvangentcom avatar paulvangentcom commented on July 30, 2024

It looks like you're still running the whole signal through heartpy, while large parts contain nothing. The exception is telling you what's going on: there's no (detectable) heart rate signal in the first portion passed to it.

You still need to expand the example code from the notebook a bit to also exclude the parts with no signal, right now it's only setting it to 0.

Alternatively you step over all exceptions and keep running the loop, those sections with sufficient heart rate signal present will then still return results.

Yet alternatively you can find plenty of free ppg datasets online.

Good luck!
Paul

from heartrate_analysis_python.

Jaswanth-Devarinti avatar Jaswanth-Devarinti commented on July 30, 2024

from heartrate_analysis_python.

paulvangentcom avatar paulvangentcom commented on July 30, 2024

As I mentioned, you need to handle the exception somehow for the cases where no heart rate signal is present in the example data. If you pass a signal segment without heart rate signal in it heartpy will complain, and that's what the exception is telling you in detail.

You can use a try except loop for handling exceptions, see the Python docs here for more info

Cheers,
Paul

from heartrate_analysis_python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.