Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#598 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@Rick-Methot-NOAA đang làm issue này rồi.

Từ ngày 2/5/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
C++
Star
46
Fork
20
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của nmfs-ost/ss3-source-code

Tất cả issue của nmfs-ost/ss3-source-code

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.