Pairwise comparisons: crashes and degenerate results in edge cases
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
Research direction
Start with R/pairwise-comparisons.R and inspect get_pairwise_comparisons(), add_relative_skill(), and plot_pairwise_comparisons() against each listed edge case. Read the related issues #1209 and #769 for the expected handling of groups with too few comparators. Done when the listed crashes, invalid ratios, row reordering, default metric failure, and plotting behavior are addressed with suitable checks or tests.
Written by the indexing model from the issue text.
Description
CLAUDE: Edge cases in get_pairwise_comparisons(), add_relative_skill() and plot_pairwise_comparisons() (R/pairwise-comparisons.R), not covered by #1209 / #769:
- A numeric
comparecolumn always crashes: "Incompatible join types: x.model (character) and i.model (double)". Hits integer model ids orcompare = "horizon".d <- data.table(model = rep(c(1, 2), each = 3), target = rep(1:3, 2), wis = c(1, 1, 1, 2, 2, 2)) get_pairwise_comparisons(scoringutils:::new_scores(d, metrics = "wis")) - A baseline missing from one
bygroup aborts the whole call ("Baseline comparatorBmissing."). Should be handled like groups with too few comparators (#1209). - Zero scores give relative skill 0,
InforNaNwithout a warning, e.g. WIS of 0 for perfect forecasts of zero counts in a small group. -
baselineof length > 1 is accepted and recycled with a base R warning. Useassert_string(). -
NAin thecomparecolumn, or a comparator named like a forecast-unit column (e.g. a model called "target"), silently getsNAratios and a relative skill of 1. -
add_relative_skill()reorders the rows, returns a keyed table, and a second call produces.x/.ycolumns. - No default metric for nominal, ordinal and multivariate scores:
add_relative_skill(score(...))fails with an assertion onmetricbecause the default only considerswis,crpsandbrier_score. -
plot_pairwise_comparisons()hard-codesmodel: withcompare = "location", by = "model"the y axis shows models, not locations; without amodelcolumn it errors.
Found during a full review of the package (version 2.3.0.9000, main at 779d7d68).
- Dominant language
- R
- Stars
- 67
- Forks
- 24
- Avg merge
- 1h 24m
- Merged PRs (30d)
- 2
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from epiforecasts/scoringutils
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
epiforecasts/scoringutils#1264 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
epiforecasts/scoringutils#1265 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
epiforecasts/scoringutils#1260 ·
Maintainers usually reply within 1 day
-
Incorrect guidance in `NEWS.md` re `add_relative_skill()`?Possibly taken @nikosbosse claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
epiforecasts/scoringutils#1226 · 1 comment · 2 reactions ·
Maintainers usually reply within 1 day
-
get_pit_histogram(): unsorted breaks produce negative densities; num_bins = 1 returns an empty tablePossibly taken @nikosbosse claimed this 15 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
epiforecasts/scoringutils#1219 ·
Maintainers usually reply within 1 day
All issues in epiforecasts/scoringutils
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
leppott/BioMonTools#162 ·
-
publications
Difficulty 1/5 Under an hour Newbie friendliness 85/100
epiforecasts/epiforecasts.github.io#161 ·
Maintainers usually reply within 1 day
-
Label `{sas}` chunk source as `sas` instead of `txt`, so it gets syntax highlightingPossibly taken @michaelmayer2 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
microbiome/OMA#1031 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ThinkR-open/golem#1265 ·