Skip to content

Conversation

@SkepticRaven
Copy link
Contributor

@SkepticRaven SkepticRaven commented Oct 21, 2025

Implements new stats to summary tables
Related: #39

Adds additional statistics to summary tables:

  • avg_bout_duration: Average bout duration per animal
  • bout_duration_std: Standard deviation of bout durations
  • bout_duration_var: Variance of bout durations
  • latency_to_first_bout: Frame number of first prediction in bin (first frame of first bout)
  • latency_to_last_prediction: Frame number of last prediction in bin (last frame of last bout)

Patches:

  • Bout counts can now properly be non-integers. Previous version counted all partial events as whole. When they should have been split into multiple bins, they would end up being double-counted.

Copy link

@jacobbeierle jacobbeierle left a comment

Choose a reason for hiding this comment

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

I like all these measures, which we talked about before developing. There is one more measure that would be useful for my opioid withdrawal work, which is latency to final bout. This would allow a quick and accessible measure of when jumping/recoil/etc behaviors resolve after precipitated withdrawal.

@SkepticRaven
Copy link
Contributor Author

Chatted a bit with Gautam about what the actual proper technique should be for doing stats with partial representation of bouts.
He recommended using a weighted mean/variance/standard deviation approach, where the weight can be the percentage that the bout is in the bin. Will update the equations shortly.

@SkepticRaven SkepticRaven merged commit debe1bb into master Oct 22, 2025
3 checks passed
@SkepticRaven SkepticRaven deleted the KLAUS-65-extend-summaries-table branch October 22, 2025 18:03
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.

4 participants