Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: "inf" value in bootstrap of mean size-at-age data for ages with sample size 0

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

@Rick-Methot-NOAA がすでに取り組んでいます。

2024年5月2日 から。

評価

この issue はまだ評価されていません。

説明

bug misc. output quick
Describe the bug

@e-perl-NOAA reported "inf" values in the bootstraps of the mean size-at-age data for the BigSkate_2019 test model.
I was able to replicate the issue in the attached files.

There is a single vector of observations where the last three bins (for males age 13-15) have 0 sample size. The bootstrap observations are reported as inf 0.0001 inf in data_boot_001.ss and as 0.0001 inf inf in data_boot_002.ss in the attached files:
boot.zip.

It looks like the code here may be randomly generating a mix of inf and -inf and then replacing the -inf with 0.0001.
https://github.com/nmfs-ost/ss3-source-code/blob/main/SS_write_ssnew.tpl#L1271-L1275

I think the following steps should be taken:

  • decide on a placeholder value for the observation. SS3 doesn't like NA (or inf) as an input value here. I used 99.9 in the original Big Skate model, perhaps because it was closer to the range of observed non-placeholder values whereas 999 would have messed up scaling in any rudimentary plot of the results before filtering those observations).
  • add a test for obs_ms_n(f, i, a) == 0 and use the placeholder value instead of generating a bootstrap value

Note that these data are excluded from the likelihood with a lambda = 0 setting, but I think that doesn't matter for any of this.

To Reproduce

Run the attached input files (which is just the BigSkate_2019 in ss3-test-models with the starter file changed to produce bootstrap files).

Expected behavior

A model without inf output that can be used as an SS3 input file.

Screenshots

No response

Which OS are you seeing the problem on?

No response

Which version of SS3 are you seeing the problem on?

No response

Additional Context

No response

主要言語
C++
スター
46
フォーク
20
平均マージ
2日 6時間
マージ済み PR(30日)
1

環境構築

Codespaces で開く

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

はじめの一歩

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

nmfs-ost/ss3-source-code のほかの issue

nmfs-ost/ss3-source-code の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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