`rp_contamination` and `isi_violations_ratio` should report an upper bound like `sliding_rp_violation` does
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start with BaseMetricExtension._run, then locate the implementations of rp_violation, isi_violation, and sliding_rp_violation to reuse the latter's confidence-based upper-bound calculation. Add the two upper-bound columns and their confidence parameters, and make metric copying skip or fill absent saved columns with NaN while warning. Done means both metrics return the new columns and analyzers saved by older versions load without a KeyError.
由索引模型根据 Issue 内容生成。
描述
The rp_violation metric computes two values/columns: rp_contamination and rp_violations.
The isi_violation metric computes isi_violations_ratio and isi_violations_count.
I am finding units with low values of rp_contamination and isi_violations_ratio that shouldn't be passing QC checks, because they don't have enough spikes to actually rule out contamination[^1]. sliding_rp_violation already handles this nicely by reporting the highest contamination (at a given confidence level, 90% by default) that the data can't rule out. An "upper bound" on possible contamination, so to speak. I think that the rp_violation and isi_violation metrics should get this, too.
Specifically, I propose having rp_violation compute a new third value/column rp_contamination_upper_bound, and having isi_violation compute a new third value/column isi_violations_ratio_upper_bound, obtained using the same method as sliding_rp_violation. They would get a new confidence parameter (0.9 by default, to match sliding_rp_violation).
There is only 1 non-trivial implementation detail that I anticipate: Adding a column to an existing metric currently breaks analyzers saved with older versions of SpikeInterface, because when more metrics are computed BaseMetricExtension._run copies the previously computed metrics into the new table column by column, using the columns each metric has now. When an expected column is not in the saved table, you get a KeyError (as in #5009). I suggest that a copy tolerate a missing column. Just copy the columns that are there, fill a missing one with NaN, and warn that the metric was computed by an older version and needs recomputing to fill the missing column. Or you could recompute automatically, but if the extensions it needs have been deleted then you're in a pickle -- so I would avoid that. Small gotcha is that filling with NaN means the column is a float, even if it will in the future (after recompute) be e.g. an integer. I don't see how/why that would be an issue.
So, in summary, I am proposing a PR with two parts (or two PRs, if preferred):
- Missing-column handling.
- Adding
rp_contamination_upper_boundandisi_violations_ratio_upper_boundcolumns to their respective metrics.
Thoughts?
@alejoe91 @samuelgarcia @chrishalcrow @JoeZiminski @h-mayorquin
[^1]: Violations are rare, so their count varies a lot by chance, and a heavily contaminated unit can easily appear to have no violations.
- 主要语言
- Python
- 星标
- 883
- 派生
- 291
- 平均合并
- 3 天 6 小时
- 30 天内合并 PR
- 39
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
SpikeInterface/spikeinterface 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
SpikeInterface/spikeinterface#5008 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 74/100
SpikeInterface/spikeinterface#5007 ·
维护者通常 1 天内回复
-
`plot_unit_presence` shows bin indices on the `Time (s)` axis when `time_range` is not given可能已有人在做 @Fireguy1 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
SpikeInterface/spikeinterface#5006 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
SpikeInterface/spikeinterface#5005 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
SpikeInterface/spikeinterface#5004 ·
维护者通常 1 天内回复
查看 SpikeInterface/spikeinterface 的全部 Issue
相似的 Issue
-
Test: to_hijri() accepts datetime.datetime and uses only the date part可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭good first issue
难度 1/5 1 小时以内 新手友好度 95/100
omarelshamy25x/shamy-hijri#63 · 3 条评论 ·
维护者通常 1 天内回复
-
polish
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scores可能已有人在做 @AshutoshSingh840 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
UKGovernmentBEIS/control-arena#992 ·
维护者通常 3 天内回复
-
难度 1/5 1 小时以内 新手友好度 92/100
mvalentsev/awesome-free-ai-coding#70 ·
维护者通常 1 天内回复