-
Notifications
You must be signed in to change notification settings - Fork 9
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
608 variable vector tests documentation #623
Merged
Andrea-Havron-NOAA
merged 18 commits into
dev
from
608-variable-vector-tests-documentation
Jun 12, 2024
Merged
608 variable vector tests documentation #623
Andrea-Havron-NOAA
merged 18 commits into
dev
from
608-variable-vector-tests-documentation
Jun 12, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Instructions for code reviewerHello reviewer, thanks for taking the time to review this PR!
Checklist
|
cmlegault
reviewed
Jun 12, 2024
cmlegault
reviewed
Jun 12, 2024
cmlegault
reviewed
Jun 12, 2024
@chris Legault - NOAA Federal ***@***.***> Each element of the
vector is independent and can be set to estimated or not. Each element is a
Parameter with the same fields and methods. So, you can fix one element in
a selectivity model that uses a vector and estimate the rest to make the
model identifiable.
…On Wed, Jun 12, 2024 at 8:32 AM Chris Legault ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In inst/include/interface/rcpp/rcpp_interface.hpp
<#623 (comment)>:
>
Rcpp::class_<ParameterVector>("ParameterVector")
.constructor()
.constructor<size_t>()
.constructor<Rcpp::NumericVector, size_t>()
- .field("data", &ParameterVector::storage_m)
- .method("at", &ParameterVector::at)
- .method("size", &ParameterVector::size)
- .method("resize", &ParameterVector::resize)
- .method("set_all_estimable", &ParameterVector::set_all_estimable)
- .method("set_all_random", &ParameterVector::set_all_random)
- .method("fill", &ParameterVector::fill);
+ .field("data", &ParameterVector::storage_m, "list where each element is a Parameter class")
+ .method("at", &ParameterVector::at, "returns a Parameter at the indicated position given th eindex argument")
+ .method("size", &ParameterVector::size, "returns the size of the Parameter Vector")
+ .method("resize", &ParameterVector::resize, "resizes the Parameter Vector given the provided length argument")
+ .method("set_all_estimable", &ParameterVector::set_all_estimable, "sets all Parameters within vector as estimable")
Does this imply that parameter vectors can only be all estimated or none
estimated? I can think of some situations where I would want to estimate
some but not all of a parameter vector. For example, if selectivity is
estimated by age, and a parameter vector is used for this selectivity, then
one of the ages needs to be fixed for the model to be identifiable. Sorry
if I'm overinterpreting this method to imply something that is not true.
—
Reply to this email directly, view it on GitHub
<#623 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABFUSEGRN55BDYR6YC6YCRLZHA5UDAVCNFSM6AAAAABJFIXR5GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMJSHA3TOOJQGA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Matthew Supernaw
Mathematical Statistician
*National Oceanic and Atmospheric Administration*
*Office Of Science and Technology*
*NOAA Fisheries | *U.S. Department of Commerce
Phone 248 - 396 - 7797
|
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What is the feature?
How have you implemented the solution?
Does the PR impact any other area of the project?
How to test this change
Developer pre-PR checklist
[x] Ran
devtools::document()
locally and pushed changes to this remote feature branch[x] Ran
devtools::check()
locally and the package compiled and all R tests passed. If there are failing tests, rundevtools::test(filter = "file_name")
(where "test-file_name.R" is the file containing the failing tests) to troubleshoot tests.