`filter_scores()`, `impute_missing_scores()`, `transform_forecasts()`, `get_coverage()`: edge cases

オープン
#1,272 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
r
領域
testing-qa

調査の方向性

Start by reading the implementations and tests for filter_scores(), impute_missing_scores(), transform_forecasts(), get_coverage(), and log_shift(), then inspect the “Handling missing forecasts” vignette. Reproduce the listed edge cases and check how existing tests cover them. Done means the identified input, validation, output, interface, and vignette issues are addressed and regression coverage confirms the expected behavior.

索引モデルが issue の本文から書いたものです。

説明

CLAUDE: - [ ] compare is not checked against the forecast unit in filter_scores() and impute_missing_scores(): filter_scores(scores, compare = "wis") removes every row with only an info message; NA in the compare column is treated as a comparator and gets imputed rows.

  • Summarised scores are accepted: imputing then mixes levels of aggregation, and filter_scores() on scores summarised by model fails with a raw data.table error.
  • The default log transform on counts with zeros makes score() drop bias for the whole data set (natural scale included): zero quantiles become -Inf and bias_quantile() fails on diff() of infinite values. The validation inside transform_forecasts() is wrapped in suppressWarnings(suppressMessages()), so nothing reports the infinite values.
  • transform_forecasts() accepts binary, nominal and ordinal forecasts and applies fun to probabilities and factor observations.
  • log_shift() checks the input before applying the offset (log_shift(-0.5, offset = 1) aborts) and accepts base = 0 and base = 1.
  • get_coverage() gives two values for one interval when a forecast lacks one bound: the row of the lower quantile level is NA, the row of the upper level a number.
  • Sample PIT bin labels are [a,b) but values are binned right-closed.
  • Interface: get_pit_histogram() has no default for by (get_coverage() has); impute_model_score(model = ) is named model although compare can be any column; filter_scores() returns a keyed, re-sorted table; label in transform_forecasts() is documented as only relevant for append = TRUE but is also used otherwise.
  • Vignette "Handling missing forecasts": the explanation of why thresholds between 0.75 and 1 behave alike is wrong (9 death targets are covered by exactly three models); the conclusion is right.

Found during a full review of the package (version 2.3.0.9000, main at 779d7d68).

主要言語
R
スター
67
フォーク
24
平均マージ
1時間 24分
マージ済み PR(30日)
2

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

epiforecasts/scoringutils のほかの issue

epiforecasts/scoringutils の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。