-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logkappa init and bounds #300
Comments
yeah, logkappa is translated into Range ( = distance with 13% correlations for an isotropic model). If Range is greater than the maximum distance among knots, or less than minimum distance, then the model typically loses the gradient for logkappa. I therefore use those bounds and back-translate to logkappa. kappa is technically the decorrelation rate (decrease in correlation per unit distance). So logkappa hitting upper bound is equivalent to a fast decorrelation. This can sometimes be solved by increasing the number of knots, so that knots are closer together, which automatically results in a higher upper bound. happy to keep chatting on this thread and definitely curious to hear what you conclude! Feel free to email me directly if that's easier. |
Thanks Jim, this was exactly what I needed. Changing the number of knots led to the bounds changing and the warning went away. I often start the number of knots at a small number to ensure that things are "working" prior to running a full model. Though, when I changed the upper bound here to Inf, the model did not converge. IMO it would be nice to allow users to change these bounds in a more simple way than entering the function via a browser call; not sure how easy that would be to code though. |
hmm. you mean that you want to reference docs to include upper and lower
as arguments in ?fit_model rather than digging through the `...`
arguments? I'm not sure I'm following about the function and browser call
piece.
…On Fri, Apr 9, 2021 at 12:09 PM Kelli Johnson ***@***.***> wrote:
Thanks Jim, this was exactly what I needed. Changing the number of knots
led to the bounds changing and the warning went away. I often start the
number of knots at a small number to ensure that things are "working" prior
to running a full model. Though, when I changed the upper bound here to
Inf, the model did not converge. IMO it would be nice to allow users to
change these bounds in a more simple way than entering the function via a
browser call; not sure how easy that would be to code though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#300 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AL62VMQIDC6R55B7LYMUN23TH5GHRANCNFSM42VOFAEA>
.
--
James Thorson
Program leader, Habitat and Ecological Processes Research (HEPR)
Alaska Fisheries Science Center, NMFS
Affiliate Faculty, University of Washington and Oregon State University
The contents of this message are mine personally and do not necessarily
reflect any position of NOAA.
|
I don't have a handle on how would be best or if users should even be able
to alter the bounds, but I used
`debugonce(make_model)` and then worked through the code until I got the
bound that I wanted, changed it to a higher value, and then entered `c` to
continue through the rest of the code automatically. We can close this, as
I don't think it is a huge deal, I got it to work and mainly I am just
happy for your comments on the parameters and logic behind the bounds so
that I could understand the direction and pattern to change them to get
things to work.
On Fri, Apr 9, 2021 at 12:12 PM Jim Thorson ***@***.***>
wrote:
… hmm. you mean that you want to reference docs to include upper and lower
as arguments in ?fit_model rather than digging through the `...`
arguments? I'm not sure I'm following about the function and browser call
piece.
On Fri, Apr 9, 2021 at 12:09 PM Kelli Johnson ***@***.***>
wrote:
> Thanks Jim, this was exactly what I needed. Changing the number of knots
> led to the bounds changing and the warning went away. I often start the
> number of knots at a small number to ensure that things are "working"
prior
> to running a full model. Though, when I changed the upper bound here to
> Inf, the model did not converge. IMO it would be nice to allow users to
> change these bounds in a more simple way than entering the function via a
> browser call; not sure how easy that would be to code though.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <
#300 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AL62VMQIDC6R55B7LYMUN23TH5GHRANCNFSM42VOFAEA
>
> .
>
--
James Thorson
Program leader, Habitat and Ecological Processes Research (HEPR)
Alaska Fisheries Science Center, NMFS
Affiliate Faculty, University of Washington and Oregon State University
The contents of this message are mine personally and do not necessarily
reflect any position of NOAA.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#300 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AA7LCFB7VGYH6SHDR4ZKOPLTH5GSDANCNFSM42VOFAEA>
.
--
Kelli Faye Johnson, PhD
Research Fish Biologist
Northwest Fisheries Science Center
National Marine Fisheries Service
2725 Montlake Boulevard East
Seattle, Washington 98112
(206) 860-3490
***@***.***
|
Hi all, Thanks! |
its not super-easy to change individual bounds using the high-level interface, without running it twice. If you don't mind running it twice, you can do: fit_orig = fit_model( ..., build_model=FALSE )
Lower = fit$tmb_list$Lower
# Change some bounds in Lower using grep(.) etc.
fit = fit_model( ..., Lower=Lower ) does that make sense? |
Yeah, that's great. Thanks Jim! |
Hi Jim, I tried what you suggested here "fit = fit_model( ..., build_model=FALSE )" to change parameter bounds. But I did not find fit$tmb_list$Lower; fit$tmb_list only includes Map, Data, Parameters, and Random. FYI, I am using version 3.8.0. Thank you in advance. |
Please try with |
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species.
Hi everyone, As a quick follow up, I was also trying the above method to change the lower bound for logkappa and I think that it needs to be entered as lower case in the fit_model call. It took some time to figure that out so I thought I would mention it here. So that would be
lower=Lower is the small difference Ben |
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: 1c9d08b
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: a781b902d8cb8968e3d7d76ae6f6ca093f74e841 [formerly bde4aa4448bdbe9e9c812afd4ecd8ad164a297b0] [formerly bde4aa4448bdbe9e9c812afd4ecd8ad164a297b0 [formerly 637d6800b449833d0b88cec7de9734c175bb3f8e]] [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe] [formerly 768eea1811351b5a29e9cddb677bab1ec945a84c [formerly 768eea1811351b5a29e9cddb677bab1ec945a84c [formerly af7ad1ed6d058c23b9b73d359eaf30bed1650ef3]] [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe [formerly 1c9d08b]]]] Former-commit-id: b318c8bbcbe0376a3a4cb45852e542fccf99ac76 [formerly f0f7e8b362af0e901294bfe276561e86343e9f34] [formerly f0f7e8b362af0e901294bfe276561e86343e9f34 [formerly 3a7af0a73a80e3969a5388fc7294bfd8409fdf1b]] [formerly 72a0221bb9a8ba0bf773593c36be01bd7655b02e [formerly 72a0221bb9a8ba0bf773593c36be01bd7655b02e [formerly 6cb86b6]]] Former-commit-id: 72a0221bb9a8ba0bf773593c36be01bd7655b02e Former-commit-id: 409c047d43ae94ecd00a27ff3a10d45cc1f2c21a [formerly 669cec9c4d86d83b37006b3512100ea11203ed8c] Former-commit-id: 8cc09999a4f3d2b42d2b5544d7d8a302eb359297
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: a781b902d8cb8968e3d7d76ae6f6ca093f74e841 [formerly bde4aa4448bdbe9e9c812afd4ecd8ad164a297b0] [formerly bde4aa4448bdbe9e9c812afd4ecd8ad164a297b0 [formerly 637d6800b449833d0b88cec7de9734c175bb3f8e]] [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe] [formerly 768eea1811351b5a29e9cddb677bab1ec945a84c [formerly 768eea1811351b5a29e9cddb677bab1ec945a84c [formerly af7ad1ed6d058c23b9b73d359eaf30bed1650ef3]] [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe [formerly c5e5c3e [formerly cd83817379f76689427bdb39f43793ef594136c4] [formerly 71334b7ce4137d624a5b15f0441e238817e4bf9d [formerly 4f69e3e4ec28788b831f633ccd07b028abe7e6df]] [formerly 3fbf388d9ebfb6e1d94f8f0fd2009ea127a4d07d [formerly d5d11a2607160bfd48d2db6847d55a4be4ca3470] [formerly f5ce05828667e7f5a89b0d3e6cdc367e23911e14 [formerly 7c6f24cf028e870fb3d813eceff14dfa7139a8cf]]] [formerly 6cb86b6] [formerly 5ef1cd270ed31fd31f8b864b511024aec5a9a8f6 [formerly 1c9d08b]]]]]] Former-commit-id: b318c8bbcbe0376a3a4cb45852e542fccf99ac76 [formerly f0f7e8b362af0e901294bfe276561e86343e9f34] [formerly f0f7e8b362af0e901294bfe276561e86343e9f34 [formerly 3a7af0a73a80e3969a5388fc7294bfd8409fdf1b]] [formerly 72a0221bb9a8ba0bf773593c36be01bd7655b02e [formerly 72a0221bb9a8ba0bf773593c36be01bd7655b02e [formerly c5e5c3e [formerly cd83817379f76689427bdb39f43793ef594136c4] [formerly 71334b7ce4137d624a5b15f0441e238817e4bf9d [formerly 4f69e3e4ec28788b831f633ccd07b028abe7e6df]] [formerly 3fbf388d9ebfb6e1d94f8f0fd2009ea127a4d07d [formerly d5d11a2607160bfd48d2db6847d55a4be4ca3470] [formerly f5ce05828667e7f5a89b0d3e6cdc367e23911e14 [formerly 7c6f24cf028e870fb3d813eceff14dfa7139a8cf]]] [formerly 6cb86b6]]]] Former-commit-id: 72a0221bb9a8ba0bf773593c36be01bd7655b02e Former-commit-id: 409c047d43ae94ecd00a27ff3a10d45cc1f2c21a [formerly 669cec9c4d86d83b37006b3512100ea11203ed8c] Former-commit-id: 8cc09999a4f3d2b42d2b5544d7d8a302eb359297 Former-commit-id: d1ccf47d3f8774663627b3adb353b91277c8c0df [formerly 84c0ce2] Former-commit-id: 669eb6729810367a57b171b37b2f1232927aaa52 Former-commit-id: 405090f6cde1d747a19077698a55a8c79268a8d7 [formerly e24f399d51b0bd174c66c72f7c6fdbc9fb309471] [formerly 8cc28f5f307f9510b9716a9b8f679427d7db99ca [formerly 4328e07d4a1b6a819795180663ddffc13a329c81]] Former-commit-id: d2f98580765d51a638d338c2d1054c4006f95a85 [formerly ade93cb6f166a9130b4af72720dbf7436a19ea95] Former-commit-id: d6f82009c0dcf16e4f031212224999cf1951bf4f
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: 5ef1cd270ed31fd31f8b864b511024aec5a9a8f6 [formerly 1c9d08b] Former-commit-id: 6cb86b6 Former-commit-id: 3fbf388d9ebfb6e1d94f8f0fd2009ea127a4d07d [formerly d5d11a2607160bfd48d2db6847d55a4be4ca3470] [formerly f5ce05828667e7f5a89b0d3e6cdc367e23911e14 [formerly 7c6f24cf028e870fb3d813eceff14dfa7139a8cf]] Former-commit-id: 71334b7ce4137d624a5b15f0441e238817e4bf9d [formerly 4f69e3e4ec28788b831f633ccd07b028abe7e6df] Former-commit-id: cd83817379f76689427bdb39f43793ef594136c4
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: a781b902d8cb8968e3d7d76ae6f6ca093f74e841 [formerly bde4aa4448bdbe9e9c812afd4ecd8ad164a297b0] [formerly bde4aa4448bdbe9e9c812afd4ecd8ad164a297b0 [formerly 637d6800b449833d0b88cec7de9734c175bb3f8e]] [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe] [formerly 768eea1811351b5a29e9cddb677bab1ec945a84c [formerly 768eea1811351b5a29e9cddb677bab1ec945a84c [formerly af7ad1ed6d058c23b9b73d359eaf30bed1650ef3]] [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe [formerly 957c76225fbe186c5ca227a8c1fe9c7dcca8aabe [formerly a51a873 [formerly 2aebfc425f459f392f7824a247a072ddc422cec7] [formerly d9ce8bc9ac6bbab27ba398c1eec59486fad9f4d7 [formerly 50a6056cd0a6c77d4a06034876f317dded85bd6e]] [formerly 5132b4d060524d26364414d772985d99b48b33fc [formerly 7a0244f4db1393ad559033cb5b281ea1d0e7ff32] [formerly 0bb903e985f042f874c31ce572261c9b2b5175ec [formerly c5e5c3e]]] [formerly cd83817379f76689427bdb39f43793ef594136c4] [formerly 71334b7ce4137d624a5b15f0441e238817e4bf9d [formerly 4f69e3e4ec28788b831f633ccd07b028abe7e6df]] [formerly 3fbf388d9ebfb6e1d94f8f0fd2009ea127a4d07d [formerly d5d11a2607160bfd48d2db6847d55a4be4ca3470] [formerly f5ce05828667e7f5a89b0d3e6cdc367e23911e14 [formerly 7c6f24cf028e870fb3d813eceff14dfa7139a8cf]]] [formerly 6cb86b6] [formerly 5ef1cd270ed31fd31f8b864b511024aec5a9a8f6 [formerly d16c9a1 [formerly d52e5bb6c3137e90cac96753ec81791ce74246f0] [formerly ccedaefc3b38bd99f8b497892ee51141267af7f0 [formerly 094daba021335dc5efcd158ae9f99ebd931c2f04]] [formerly a7ef685610e2281e5f21c3ae75cdf17b02ab56a1 [formerly 2ca6f6ee216df4c52b835e8eccc6fd1d7bda381c] [formerly 5ef1cd270ed31fd31f8b864b511024aec5a9a8f6 [formerly 1c9d08b]]]]]]]]] Former-commit-id: b318c8bbcbe0376a3a4cb45852e542fccf99ac76 [formerly f0f7e8b362af0e901294bfe276561e86343e9f34] [formerly f0f7e8b362af0e901294bfe276561e86343e9f34 [formerly 3a7af0a73a80e3969a5388fc7294bfd8409fdf1b]] [formerly 72a0221bb9a8ba0bf773593c36be01bd7655b02e [formerly 72a0221bb9a8ba0bf773593c36be01bd7655b02e [formerly a51a873 [formerly 2aebfc425f459f392f7824a247a072ddc422cec7] [formerly d9ce8bc9ac6bbab27ba398c1eec59486fad9f4d7 [formerly 50a6056cd0a6c77d4a06034876f317dded85bd6e]] [formerly 5132b4d060524d26364414d772985d99b48b33fc [formerly 7a0244f4db1393ad559033cb5b281ea1d0e7ff32] [formerly 0bb903e985f042f874c31ce572261c9b2b5175ec [formerly c5e5c3e]]] [formerly cd83817379f76689427bdb39f43793ef594136c4] [formerly 71334b7ce4137d624a5b15f0441e238817e4bf9d [formerly 4f69e3e4ec28788b831f633ccd07b028abe7e6df]] [formerly 3fbf388d9ebfb6e1d94f8f0fd2009ea127a4d07d [formerly d5d11a2607160bfd48d2db6847d55a4be4ca3470] [formerly f5ce05828667e7f5a89b0d3e6cdc367e23911e14 [formerly 7c6f24cf028e870fb3d813eceff14dfa7139a8cf]]] [formerly 6cb86b6]]]] Former-commit-id: 72a0221bb9a8ba0bf773593c36be01bd7655b02e Former-commit-id: 409c047d43ae94ecd00a27ff3a10d45cc1f2c21a [formerly 669cec9c4d86d83b37006b3512100ea11203ed8c] Former-commit-id: 8cc09999a4f3d2b42d2b5544d7d8a302eb359297 Former-commit-id: d1ccf47d3f8774663627b3adb353b91277c8c0df [formerly ebb75fb [formerly e41ff35a22027d3568cf66993794b4dae21b860d] [formerly 0931969d4f70354dfea2cc333ac73777d104c37c [formerly 0bf21e4e3362fabe8965988968af1f00807e0e80]] [formerly f1b8f4760f5439abc21ffad5f33a62acccdbd25d [formerly ea68f0215f5f208e359cee2fb7cd50af3ff2f518] [formerly bdbed00745101a49499e5523c568c758e1490443 [formerly 84c0ce2]]]] Former-commit-id: 669eb6729810367a57b171b37b2f1232927aaa52 Former-commit-id: 405090f6cde1d747a19077698a55a8c79268a8d7 [formerly e24f399d51b0bd174c66c72f7c6fdbc9fb309471] [formerly 8cc28f5f307f9510b9716a9b8f679427d7db99ca [formerly 4328e07d4a1b6a819795180663ddffc13a329c81]] Former-commit-id: d2f98580765d51a638d338c2d1054c4006f95a85 [formerly ade93cb6f166a9130b4af72720dbf7436a19ea95] Former-commit-id: d6f82009c0dcf16e4f031212224999cf1951bf4f Former-commit-id: b9911ea7ec987b0a86cfcf5b8c61c46dc8388345 [formerly 79894aa930e38dd0f3223107e9b3a75bb9968afd] [formerly f287c2711e9948dd8234a7342f60141cf900f16d [formerly 55f1951]] Former-commit-id: 4f796d09294300576a9793b6466e33e5ad9da28a [formerly 7c56fe8bf0b0a93fa38acab3da4793915f154beb] Former-commit-id: 7425303ed4e62e2a6c0cd0af03a1c94461851ad3
using VAST_3.9.0 the upper bound of logkappa2 is reached using the default settings b/c of the small number of mesh points. This commit changes the upper bound to 10 using run_model = FALSE to get the correct map. This trick can be found in James-Thorson-NOAA/VAST#300 which was started by @kellijohnson-NOAA b/c of similar issues when running the model for West Coast species. Former-commit-id: 5ef1cd270ed31fd31f8b864b511024aec5a9a8f6 [formerly d16c9a1 [formerly d52e5bb6c3137e90cac96753ec81791ce74246f0] [formerly ccedaefc3b38bd99f8b497892ee51141267af7f0 [formerly 094daba021335dc5efcd158ae9f99ebd931c2f04]] [formerly a7ef685610e2281e5f21c3ae75cdf17b02ab56a1 [formerly 2ca6f6ee216df4c52b835e8eccc6fd1d7bda381c] [formerly 5ef1cd270ed31fd31f8b864b511024aec5a9a8f6 [formerly 1c9d08b]]]] Former-commit-id: 6cb86b6 Former-commit-id: 3fbf388d9ebfb6e1d94f8f0fd2009ea127a4d07d [formerly d5d11a2607160bfd48d2db6847d55a4be4ca3470] [formerly f5ce05828667e7f5a89b0d3e6cdc367e23911e14 [formerly 7c6f24cf028e870fb3d813eceff14dfa7139a8cf]] Former-commit-id: 71334b7ce4137d624a5b15f0441e238817e4bf9d [formerly 4f69e3e4ec28788b831f633ccd07b028abe7e6df] Former-commit-id: cd83817379f76689427bdb39f43793ef594136c4 Former-commit-id: 5132b4d060524d26364414d772985d99b48b33fc [formerly 7a0244f4db1393ad559033cb5b281ea1d0e7ff32] [formerly 0bb903e985f042f874c31ce572261c9b2b5175ec [formerly c5e5c3e]] Former-commit-id: d9ce8bc9ac6bbab27ba398c1eec59486fad9f4d7 [formerly 50a6056cd0a6c77d4a06034876f317dded85bd6e] Former-commit-id: 2aebfc425f459f392f7824a247a072ddc422cec7
Starting with version VAST_v1_6_0 ...
VAST/R/make_parameters.R
Line 119 in 339db31
I am trying to fit models to data from the US West Coast within the US EEZ and I am getting the following error
Can you please point me to documentation on why the bounds are being set in this way and why the init value is log(0.9) for recent versions? The model fits if I enter the function and increase the upper bound but I am not sure if this is something that I actually should be doing and I wanted to ask if we should think about the init value being outside of the default bounds because of the distances that are being calculated. Thank you for any guidance that you can provide.
The text was updated successfully, but these errors were encountered: