[fix]: Rceattle converter publishes wrong composition, age and uncertainty values
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 18/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- r
調査の方向性
Start with the Rceattle converter that builds the standardized output, reading quantities$comp_hat, quantities$comp_obs and quantities$age_hat, plus the filter_data() uncertainty branch and the plot_index() guard list. Each of the six defects is a separate, arguably maintainer-level decision about what the standard means, so the issue does not name one contained fix. Done would mean the converted GOAatf output has correctly dimensioned comp predictions, a valid age column, a standard uncertainty label, and plots that resolve to the right series.
索引モデルが issue の本文から書いたものです。
説明
Found while tracing the Rceattle branch for #400. These are pre-existing lines that the repair in #401 makes execute for the first time, so none is a regression — but the first three publish wrong numbers rather than missing ones. Measured on a GOAatf fit (1 species, 2 sexes, nages = 21, 1961–2050, 59 composition rows).
1. Predicted composition is in the age dimension for length comps. Predictions come from quantities$age_hat, predicted catch at true age, and are used for every row of comp_data. 14 rows are age comps (42 bins) and 45 are length comps (52 bins), so 2,340 of the 2,928 observed values get age-dimensioned predictions. quantities$comp_hat is the aligned quantity — each observation's own dimension, one-to-one with comp_data, rows summing to 1 — and its observed counterpart is quantities$comp_obs. Note filter(estimate != 0) hides the mismatch, because age_hat[, 43:52] is exactly 0 on a length row. The two series are also incomparable in scale even on the age rows: observed row sums run 194–3.6e9 against predicted 1.5e6–2.2e6.
2. Composition rows publish an age the model does not have. Every comp row is joint-sex (Sex = 3), so a comp vector is sex 1's bins followed by sex 2's. Both go into age as bin ordinals, giving age up to 52 for a 21-age model on 2,928 of 5,406 rows. Because age0_length1 is dropped, nothing in the output records which rows are length bins or which sex a bin belongs to, so it cannot be repaired downstream.
3. uncertainty_label = "log_sd" is not in the standard vocabulary. 214 rows carry it, and filter_data() branches on grepl("sd", ...), so it takes the sd branch and builds estimate ± uncertainty on the natural scale. An index observation of 1,112,215 with a log-scale sd of 0.064 gets a band of ±0.06 instead of 981,047–1,260,920. The SS3 vocabulary is sd/se/std/stddev. Separately the predicted row inherits the observation's log_sd, so index_predicted publishes observation error as estimation error.
4. plot_index() resolves to the series with no years. The output carries log_index_hat (module sdrep, 17 values, all year = NA) and index_observed/index_predicted (module data_list, correct years). The module disambiguator picks sdrep, so the figure gets 17 points at year = NA. The existing guard label %notin% c("index_hat", "catch_h") does not list log_index_hat.
5. Projection years publish a catch of 0. catch_hat is only computed on hindcast rows, so the 32 projection years carry catch_predicted = 0 against catch = NA — a landings figure shows the fishery stopping in 2019.
6. A held-out observation publishes a negative year. Rceattle's convention for carrying an observation but excluding it from the likelihood is a negative Year, which converts to year = -1984 with era = "time", putting a point at −1984 on any index figure.
Related: only sdrep and data_list reach the output. The converter emits those two modules, so quantities never reaches the standardized output — that is where n_at_age, biomass_at_age, m_at_age, f_at_age, sel, b0, flimit and ftarget live, ~1.6M rows and 92 labels on this fit. Consequently plot_landings(), plot_catch_comp() and plot_abundance_at_age() fail on converted Rceattle output (landings not found., abundance not found.) while plot_biomass(), plot_spawning_biomass(), plot_recruitment(), plot_index() and plot_recruitment_deviations() return figures. It is also why 31 of the 35 unit cells corrected in #401 are currently dormant, and why the catch_hat → landings mapping in rceattle_var_names.csv never fires.
Happy to take any of these on — I held off in #401 because each is a decision about what the standard means rather than a repair.
- 主要言語
- R
- スター
- 20
- フォーク
- 8
- 平均マージ
- 20時間 52分
- マージ済み PR(30日)
- 10
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nmfs-ost/stockplotr のほかの issue
-
Reduce runtime of `convert_output` tests対応中かも @JZahner1 が 3 日前に担当しました。 オープン
nmfs-ost/stockplotr#409 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Handful of Variable Naming Convention Things対応中かも @Schiano-NOAA が 3 日前に担当しました。 オープン
nmfs-ost/stockplotr#407 · リアクション 1 件 · 担当者 2 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
nmfs-ost/stockplotr#403 ·
メンテナーはふだん 1 日以内に返信
-
[feat] Begin deprecation steps for report.sso file in convert_output()対応中かも @Schiano-NOAA が 4 日前に担当しました。 オープン
nmfs-ost/stockplotr#402 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
fix: RCeattle `convert_output`対応中かも @Schiano-NOAA が 4 日前に担当しました。 オープン
nmfs-ost/stockplotr#400 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
nmfs-ost/stockplotr の issue をすべて見る
似ている issue
-
Write an exception for delayed NYC data only対応中かも @kaitejohnson が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
New `filter_out()` requires dplyr >= 1.2.0対応中かも @jameslairdsmith が 1 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 74/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100