Code Monkey home page Code Monkey logo

Comments (6)

jhmigueles avatar jhmigueles commented on June 26, 2024

Small update, the QC plot looks better if using BFEN instead of ENMO, it seems that the band pass filter can fix this?

image

from ggir.

vincentvanhees avatar vincentvanhees commented on June 26, 2024

There are probably multiple problems/solutions here:

Problems:

  • Metric choice. As we know BFEN is less sensitive to calibration error => but changing metric does not offer an easy solution because absolute values are not comparable to ENMO
  • Calibration procedure uses too much non-wear time, which skews the results.
  • QC visualisation looks strange => not really a solution to fix only the visualisation
  • With do.imp = FALSE we use the poorly calibrate values.

Possible solutions:

  • Add option to impute by zero
  • Modify g.calibrate to ignore near-duplicates.
  • Add option to remove non-wear from day.

from ggir.

jhmigueles avatar jhmigueles commented on June 26, 2024

Add option to impute by zero

Done, it works as expected, all the invalid segments are turned to zero (for all metrics except for EN which is set to 1).

Modify g.calibrate to ignore near-duplicates.

I have tried rounding the data to find duplicates to 4, 3, and 2 digits as we discussed. The effect in the calibration coefficients and the QC plots is trivial. This seems not to work. See for example:
image

Add option to remove non-wear from day.

Followup question: do we want to do this only in the part 2 reports? Or also for part 4 and part 5 reports? If so, then we would need to consider the longest nonwear period of the day as SPT, right? This has the advantage that the users would also get Inactivity and Light PA estimates.

from ggir.

vincentvanhees avatar vincentvanhees commented on June 26, 2024

I have tried rounding the data to find duplicates to 4, 3, and 2 digits as we discussed. The effect in the calibration coefficients and the QC plots is trivial. This seems not to work. See for example:

Thanks for exploring this.

  • Where can I find the code for this or is it not in a branch yet?
  • We should use the rounded values for identifying duplicates and then go back to the original values for performing the auto-calibration. Did you do this?

Followup question: do we want to do this only in the part 2 reports? Or also for part 4 and part 5 reports? If so, then we would need to consider the longest nonwear period of the day as SPT, right? This has the advantage that the users would also get Inactivity and Light PA estimates.

Sounds good to do this for part 4 and 5 too. I suppose this will be a big change to the code. Should we keep the current implementation as the default and do this as optional?

from ggir.

jhmigueles avatar jhmigueles commented on June 26, 2024

Where can I find the code for this or is it not in a branch yet?

It is now in the issue691_calibration branch.

We should use the rounded values for identifying duplicates and then go back to the original values for performing the auto-calibration. Did you do this?

Yes, I only use the rounded numbers to detect duplicates and remove those values. But never modify the values themselves.

Sounds good to do this for part 4 and 5 too. I suppose this will be a big change to the code. Should we keep the current implementation as the default and do this as optional?

I thought in a simpler way of doing this. The main purpose was to obtain the sedentary and light classifications in part 2, since when the device is not worn during sleep, we assume that all the wear time is awake and we do not need the SPT definition. So, I implemented the identify_levels function in part 2 (in g.analyse.perday) only when the device is not worn during sleep (there is a new argument for this). So, the standard processing in GGIR is not affected, this is an option only when the device is not worn during sleep.

I will make some more tests on this branch before doing a PR

from ggir.

vincentvanhees avatar vincentvanhees commented on June 26, 2024

I am now closing this issue because it has been open for a long time and I am not sure it is still an issue.
The code now much better deals with idle sleep mode and deals with long episodes of constant sensor orientation.
Feel free to re-open if you think this is still an issue that needs attention.

from ggir.

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.