`lowess` returns 0 for points of an exact fit after robustness iterations
I maintainer di solito rispondono entro 1 giorno
@aviralgarg05 ci sta già lavorando.
Dal 17/11/2026.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 74/100
Direzione di ricerca
Inizia da stats.py righe 116-121, dove l'iterazione di robustezza decide se un residuo assoluto mediano esattamente 0 significhi un fit esatto; quella soglia è la correzione. Esegui lo snippet di riproduzione per confermare che iter=1 passa mentre iter=5 restituisce 0 ai punti 44-49, poi varia pendenza e intercetta per verificare che la tolleranza non sia troppo ampia. ds.py:480 mostra il chiamante nel filtraggio indipendente, ma l'issue dice che l'effetto di padj non è verificato, quindi punta ai test lowess. Fatto significa che entrambi i conteggi di iterazioni restano entro 1e-6 dalla linea e i test stats esistenti passano.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
After a robustness iteration, stats.lowess weights points by their residual over six times the median absolute residual; on an exact fit the residuals are rounding noise, so some points get weight 0, and where a whole neighbourhood does, lstsq returns beta = 0 and the fitted value is 0, as at points 46 to 49 of the line y = 3 - 7.5x with frac=0.1, iter=5; a local linear regression of points on a line should return the line, as the same call does with iter=1. stats.py:116-121 treats only a median of exactly 0 as an exact fit; treating a median below a small multiple of the targets' scale as zero would fix it.
lowess smooths the rejection counts of independent filtering (ds.py:480), whose plateaus are locally exact fits; we have not looked for a dataset where this changes padj.
Source line numbers refer to commit 2ca3b74.
Reproduction
import numpy as np
from pydeseq2.stats import lowess
x = np.linspace(0.1, 0.95, 50)
y = 3 - 7.5 * x
for iterations in [1, 5]:
fit = lowess(x, y, frac=0.1, iter=iterations)
off = np.flatnonzero(np.abs(fit - y) > 1e-6)
print(f"iter={iterations}: points off the line {off.tolist()}")
if len(off):
print("fitted:", fit[off].round(4).tolist())
print("line:", y[off].round(4).tolist())
Expected: no points off the line for either number of iterations.
Actual, with PyDESeq2 0.6.0:
iter=1: points off the line []
iter=5: points off the line [44, 45, 46, 47, 48, 49]
fitted: [-3.373, -3.4016, 0.0, 0.0, 0.0, 0.0]
line: [-3.4745, -3.6046, -3.7347, -3.8648, -3.9949, -4.125]
Split out from #491.
- Lingua principale
- Python
- Stelle
- 770
- Fork
- 98
- Merge medio
- 19h 55m
- PR unite (30g)
- 45
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scverse/PyDESeq2
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
`irls_solver` does not enforce `min_beta` when IRLS converges, and documents `max_beta`'s default as -30Forse di nuovo libera @aviralgarg05 l’ha presa 15 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
scverse/PyDESeq2#521 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`MAP_dispersions` of refitted genes keep the value from before outlier replacementForse di nuovo libera @aviralgarg05 l’ha presa 15 giorni fa e non c’è nessuna pull request aperta. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
scverse/PyDESeq2#519 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
`prior_LFC_var` is squared in the Wald test's ridgeForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di scverse/PyDESeq2
Issue simili
-
Make the "%" unit spacing the same in the web and in A10Forse già presa @kragent66-glitch l’ha presa oggi. Apertabug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
maiychrus25/OpenTea-DX-OS#226 · 1 commento ·
-
ci severity: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
TMHSDigital/Spackle#205 ·
I maintainer di solito rispondono entro 1 giorno
-
pkg:lgm type:chore upstream-gaussx
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
jejjohnson/pyrox#610 ·
I maintainer di solito rispondono entro 1 giorno
-
changelog investigate
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ramnes/notion-sdk-py#523 ·
-
feature-request
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
open-telemetry/opentelemetry-python#5994 ·
I maintainer di solito rispondono entro 2 giorni