raphaelvallat/yasa: v0.8.1
- 1. ŌURA
- 2. Human Augmented Brain System
- 3. University of Oxford & OUH
- 4. University of Washington
- 5. Massachusetts Institute of Technology
- 6. AstronauTx
- 7. L2IT
Description
This is a minor release. Its highlight is the support for repeated measures in the evaluation module, for validation studies that record several nights per participant. It also adds a new method to compare detected events based on their overlap and fixes a deprecation warning with pandas 3.1.
Evaluation module: support several nights per subject (repeated measures)
yasa.EpochByEpochAgreement and yasa.SleepStatsAgreement accept a new subjects argument that tells YASA which participant each night belongs to. The nights of a participant are not independent, and treating them as such makes the confidence intervals and p-values too small. With subjects, both classes account for the clustering of nights within participants, following Bland & Altman (2007), Zou (2013) and Parker et al. (2016). With one night per participant, the results are unchanged. See the new Several nights per subject section of the evaluation tutorial. (#279)
Improvements
yasa.compare_detectionand thecompare_channelsandcompare_detectionmethods of the detection results acceptmethod="intersection"to match events based on the overlap of their intervals (intersection over union) instead of the distance between their onsets. This makes it possible to compare detections with different sampling frequencies, and prevents split, merged or duplicate detections from all counting as true positives. The defaultmethod="distance"is unchanged. (#88, #278)compare_channelsis up to 6 times faster, as the events of each channel are now validated and sorted once and each pair of channels is compared once. (#282)
Bugfixes
- Fixed a
Pandas4Warninginyasa.SleepStagingwith pandas 3.1, which deprecates theinplacekeyword ofsort_index. (#283)
Dependencies
- statsmodels is a new optional dependency, required only for the mixed models of
yasa.SleepStatsAgreementwith several nights per participant. Install it withpip install yasa[stats](included inyasa[full]).
Contributors
Files
raphaelvallat/yasa-v0.8.1.zip
Additional details
Related works
- Is supplement to
- Software: https://github.com/raphaelvallat/yasa/tree/v0.8.1 (URL)
Software
- Repository URL
- https://github.com/raphaelvallat/yasa