[fix]: Rceattle converter publishes wrong composition, age and uncertainty values
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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
- 派生
- 9
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 12
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
nmfs-ost/stockplotr 的其他 Issue
-
[tests]: Set modules in all plot_* calls within test functions可能已有人在做 @Schiano-NOAA 于 3 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 68/100
nmfs-ost/stockplotr#416 · 5 条评论 · 1 个 reaction · 已指派 2 人 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 15/100
nmfs-ost/stockplotr#422 ·
维护者通常 1 天内回复
-
[fix]: module name selection retained in environment when `make_rda = T`可能已有人在做 @sbreitbart-NOAA 于 1 天前认领。 未关闭bug
nmfs-ost/stockplotr#421 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Make tests more efficient可能已有人在做 @JZahner1 于 2 天前认领。 未关闭
nmfs-ost/stockplotr#420 · 4 条评论 · 已指派 2 人 ·
维护者通常 1 天内回复
-
[tests]: are "rda file made when indicated" tests needed for every plot?可能已有人在做 @Schiano-NOAA 于 2 天前认领。 未关闭question
nmfs-ost/stockplotr#418 · 10 条评论 · 已指派 3 人 ·
维护者通常 1 天内回复
查看 nmfs-ost/stockplotr 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 67/100
-
难度 2/5 1-3 小时 新手友好度 64/100
mitchelloharawild/ggtime#39 ·
-
enhancement good first issue help wanted
难度 2/5 半天 新手友好度 82/100
-
难度 2/5 1-3 小时 新手友好度 62/100
-
难度 1/5 1 小时以内 新手友好度 82/100
GSK-Biostatistics/multigrain#43 ·
维护者通常 1 天内回复