Comments (6)
Small update, the QC plot looks better if using BFEN instead of ENMO, it seems that the band pass filter can fix this?
from ggir.
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.
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:
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.
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.
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.
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)
- Extracting non-wear from `M$metalong$nonwearscore`? HOT 4
- save_ms5raw_without_invalid = TRUE misses last window in recording
- g.inspectfile cannot work with gz files
- Change log issues HOT 2
- relyonguider does not produce expected output
- Handle empty columns in sleeplog
- Make `.onAttach` not call `chooseCRANmirror`
- Data cleaning file night_part4 bug
- Inform user when trying to run part X when part X-1 output folder is empty.
- Rename sleepefficiency in part 5 to sleep_efficiency_after_onset
- bug in exclusion invalid days in part5
- search not working for gh-pages HOT 2
- Sleep Log: Missing Onset or Offset HOT 2
- timegap imputation for ad-hoc csv not working?
- broaden range of optional values for parameter chunksize
- Option to specify or auto-detect desired order of sleep 'guider' methods to be used
- Sleep efficiency calculation part 4 incorrectly uses guider instead of detect SPT window HOT 1
- Error in if (is.na(defaultGuiderOnset) == TRUE) { => Recording with 1 midnight that starts before 4am
- Minor bug in append records functionality
- Minimum sample frequency
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ggir.