Closed ryanhammonds closed 2 years ago
Merging #106 (9b941f0) into main (da8c9b7) will increase coverage by
0.83%
. The diff coverage is92.30%
.
@@ Coverage Diff @@
## main #106 +/- ##
==========================================
+ Coverage 96.27% 97.11% +0.83%
==========================================
Files 23 29 +6
Lines 860 1385 +525
==========================================
+ Hits 828 1345 +517
- Misses 32 40 +8
Impacted Files | Coverage Δ | |
---|---|---|
bycycle/features/features.py | 96.42% <ø> (ø) |
|
bycycle/features/burst.py | 97.80% <90.90%> (+0.15%) |
:arrow_up: |
bycycle/objs/fit.py | 100.00% <100.00%> (ø) |
|
bycycle/plts/burst.py | 93.42% <0.00%> (-2.36%) |
:arrow_down: |
bycycle/utils/dataframes.py | 100.00% <0.00%> (ø) |
|
bycycle/spikes/features/shape.py | 100.00% <0.00%> (ø) |
|
bycycle/spikes/objs.py | 98.55% <0.00%> (ø) |
|
bycycle/spikes/plts.py | 100.00% <0.00%> (ø) |
|
bycycle/spikes/utils.py | 97.56% <0.00%> (ø) |
|
bycycle/spikes/cyclepoints.py | 100.00% <0.00%> (ø) |
|
... and 2 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update da8c9b7...9b941f0. Read the comment docs.
This adds an optional parameter (
consistency_mode
) to change how consistency measures are determined. Previously, amplitude consistency was computed asnp.min([consist_current, consist_next, consist_last])
. The first cycle of a burst would always have a small consist_last (the last cycle would always have a small consist_next), results in potentially mislabeled first/last cycles per each burst.A solution was merged in #90, which allowed lowering the consistency thresholds for the edges of bursts. This PR offers an alternative, which allows taking the mean or max of adjacent periods/amplitudes, in addition to the min.
I'd argue that setting consistency_mode == 'mean', is a better default in some cases. One potential downside of using mean consistency, however, is that the consistency of non-burst cycles next to bursts will be a inflated. I have left the default to the original 'min' for now.