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

Revision transition probability calculations and clean up function g.fragmentation #902

Merged
merged 26 commits into from
Sep 26, 2023

Conversation

vincentvanhees
Copy link
Member

@vincentvanhees vincentvanhees commented Sep 14, 2023

In this PR:

  • g.fragmentation code cleaned up
  • TP formulas revised following feedback Ian Danilevicz
  • Code now also produces sleep fragmentation and PA fragmentation for the SPT window
  • All fragmentation variables are not automatically rounded to 3 but to 6 decimal places as we expect some fragmentation
  • metrics to reveal meaningful differences at 4 or 5 decimal places

Relates to #817

@jhmigueles - When you have time in the upcoming weeks, would you mind testing that this branch still works correctly for the new part5 segment analysis as discussed here?

Checklist before merging:

  • Existing tests still work (check by running the test suite, e.g. from RStudio).
  • Added tests (if you added functionality) or fixed existing test (if you fixed a bug).
  • Updated or expanded the documentation.
  • Updated release notes in inst/NEWS.Rd with a user-readable summary. Please, include references to relevant issues or PR discussions.
  • Added your name to the contributors lists in the DESCRIPTION and CITATION.cff files.

Copy link
Collaborator

@jhmigueles jhmigueles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this works in combination with segment analysis in part 5. NA values in fragmentation metrics are now handled and values are virtually the same. I noticed that for some days/segments, in the new version we get one less fragment than in the current version in master, which I think is in line with this revision of the function.

@vincentvanhees vincentvanhees marked this pull request as ready for review September 26, 2023 11:08
@vincentvanhees vincentvanhees merged commit 45a1569 into master Sep 26, 2023
8 checks passed
@vincentvanhees vincentvanhees deleted the issue817_transition_probability branch September 27, 2023 08:39
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

Successfully merging this pull request may close these issues.

2 participants