`rp_contamination` and `isi_violations_ratio` should report an upper bound like `sliding_rp_violation` does
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 55/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 883
- Forks
- 291
- Merge moyen
- 3 j 6 h
- PR mergées (30 j)
- 39
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de SpikeInterface/spikeinterface
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
SpikeInterface/spikeinterface#5008 ·
Les mainteneurs répondent en général sous 1 jour
-
`plot_potential_merges` draws the correlograms of other units when a merge group is not sortedOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
SpikeInterface/spikeinterface#5007 ·
Les mainteneurs répondent en général sous 1 jour
-
`plot_unit_presence` shows bin indices on the `Time (s)` axis when `time_range` is not givenPeut-être pris @Fireguy1 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
SpikeInterface/spikeinterface#5006 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 83/100
SpikeInterface/spikeinterface#5005 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
SpikeInterface/spikeinterface#5004 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de SpikeInterface/spikeinterface
Issues similaires
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertegood first issue
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
omarelshamy25x/shamy-hijri#63 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
polish
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPeut-être pris @AshutoshSingh840 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
UKGovernmentBEIS/control-arena#992 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Les mainteneurs répondent en général sous 1 jour