[Bug]: "inf" value in bootstrap of mean size-at-age data for ages with sample size 0
@Rick-Methot-NOAA ya está trabajando en esto.
Desde el 2/5/2024.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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(orinf) 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) == 0and 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
- Lenguaje dominante
- C++
- Estrellas
- 46
- Forks
- 19
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nmfs-ost/ss3-source-code
-
composition in progress
nmfs-ost/ss3-source-code#751 · 1 comentario · 1 asignado ·
-
area & movement
nmfs-ost/ss3-source-code#731 · 3 comentarios · 1 asignado ·
-
misc. output
nmfs-ost/ss3-source-code#723 · 1 asignado ·
-
biology misc. output ongoing
nmfs-ost/ss3-source-code#702 · 1 asignado ·
-
recruitment
nmfs-ost/ss3-source-code#696 · 1 asignado ·
Todos los issues de nmfs-ost/ss3-source-code
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
google/libultrahdr#485 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
godotengine/godot#123776 ·
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 60/100
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
ros2/common_interfaces#344 ·