`rp_contamination` and `isi_violations_ratio` should report an upper bound like `sliding_rp_violation` does
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 883
- Forks
- 291
- Merge medio
- 3 d 6 h
- PR fusionados (30 d)
- 39
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de SpikeInterface/spikeinterface
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
SpikeInterface/spikeinterface#5008 ·
Los mantenedores suelen responder en 1 día
-
`plot_potential_merges` draws the correlograms of other units when a merge group is not sortedAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
SpikeInterface/spikeinterface#5007 ·
Los mantenedores suelen responder en 1 día
-
`plot_unit_presence` shows bin indices on the `Time (s)` axis when `time_range` is not givenPosiblemente ocupada @Fireguy1 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
SpikeInterface/spikeinterface#5006 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
SpikeInterface/spikeinterface#5005 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
SpikeInterface/spikeinterface#5004 ·
Los mantenedores suelen responder en 1 día
Todos los issues de SpikeInterface/spikeinterface
Issues similares
-
Test: to_hijri() accepts datetime.datetime and uses only the date partPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertogood first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100
omarelshamy25x/shamy-hijri#63 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
polish
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
521xueweihan/HelloGitHub#4729 ·
-
[Bug]: Score parser reads parts of scientific notation as valid scoresPosiblemente ocupada @AshutoshSingh840 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
UKGovernmentBEIS/control-arena#992 ·
Los mantenedores suelen responder en 3 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
mvalentsev/awesome-free-ai-coding#70 ·
Los mantenedores suelen responder en 1 día