Univariate metrics: edge cases in PIT, integer detection, interval coverage and input checks
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start by reading the affected metric implementations and their tests in the scoringutils package, especially pit_histogram_sample(), get_type(), interval_coverage(), logs_binary(), and the quantile and point metric functions. Reproduce the listed examples and check existing tests for input validation, missing values, and matrix outputs. Done means the reported edge cases have consistent, tested behavior across the affected metrics.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
CLAUDE: - [ ] The randomised PIT uses one uniform draw per replicate for all forecasts (runif(1)); Czado et al. (2009) use an independent draw per forecast. With few replicates the histogram of a calibrated forecast looks miscalibrated.
P <- matrix(rep(0:9, 100), 100, byrow = TRUE); set.seed(1)
pit_histogram_sample(rep(5, 100), P, seq(0, 1, 0.01)[c(1, 51:61, 101)],
integers = "random", n_replicates = 1)
#> 0 0 0 100 0 0 0 0 0 0 0 0
-
get_type()uses a relative tolerance, so continuous samples around 1e8 are classified as integer andbias_sample()uses the integer formula (bias_sample(1e8 + 0.5, matrix(1e8 + runif(200), 1))is about 0.5 rather than about 0). Values above 2^31 warn ("NAs introduced by coercion to integer range"). Suggestion:all(x == round(x)). -
interval_coverage()returnslogical(0)for interval ranges that are not round numbers, e.g.interval_range = 100 / 3with levels 1/3 and 2/3, because one comparison is rounded and the other is not. -
NAinquantile_levelis accepted and handled differently by each metric (quantile_score()givesNA,bias_quantile()a value,wis()an error). -
logs_binary()loses precision:-log(1 - abs(observed - predicted))returnsInfforp = 1e-17where 39.1 is correct. -
na.rmis inconsistent:wis()defaults toFALSE,bias_quantile()toTRUE, other quantile metrics have no such argument; sample metrics differ in whetherNAerrors, givesNA, or is dropped. - Point metrics are unvalidated anonymous functions with the argument
actualinstead ofobserved; inputs recycle silently. -
pit_histogram_sample()barely validatesn_replicatesandquantiles. - The default sample metrics include
log_score, which warns for every integer-valued data set, includingexample_sample_discrete. - Binary metrics return a matrix when
predictedis an n x 1 matrix.
Found during a full review of the package (version 2.3.0.9000, main at 779d7d68).
- Lingua principale
- R
- Stelle
- 65
- Fork
- 24
- Merge medio
- 1h 24m
- PR unite (30g)
- 2
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- 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 epiforecasts/scoringutils
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
epiforecasts/scoringutils#1264 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
epiforecasts/scoringutils#1265 ·
I maintainer di solito rispondono entro 1 giorno
-
Non-randomised PIT for integer forecasts drops forecasts whose observation exceeds all samplesAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
epiforecasts/scoringutils#1260 ·
I maintainer di solito rispondono entro 1 giorno
-
Incorrect guidance in `NEWS.md` re `add_relative_skill()`?Forse già presa @nikosbosse l’ha presa 3 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
epiforecasts/scoringutils#1226 · 1 commento · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
get_pit_histogram(): unsorted breaks produce negative densities; num_bins = 1 returns an empty tableForse già presa @nikosbosse l’ha presa 3 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
epiforecasts/scoringutils#1219 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di epiforecasts/scoringutils
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
waldronlab/bugphyzz#301 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
r-lib/tree-sitter-r#209 ·
-
Suggest rmoriebricklayerAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 67/100
-
Suggest rmoriebricklayerAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 79/100
cran-task-views/CausalInference#52 · 1 commento ·