Tags: PublicDataArchive/FIMS
Tags
fix(0.3.0.0): Fixes cli and -999 (NOAA-FIMS#726) * Pluralism in cli was incorrect where a single integer needs to be passed before the {?*} to inform if it should be plural or not, instead of passing a vector like what was being done. * Composition modules are initialized using the composition times the uncertainty, which was failing for -999 values because -999 * uncertainty does not equal -999 and was leading to the likelihood being evaluated. Thanks to the scamp example for bringing these errors to our attention.
Release 0.3.0.0
* Fits to length data using an age-to-length-conversion matrix, `data1`
includes the necessary information needed to fit to both ages and lengths.
* Adds C++ ParameterVector to allow for the estimation of time-varying
parameters.
* Implements R wrapper functions to facilitate
* creating the input model specifications with `create_default_*()`,
`update_parameters()`, and `initialize_*()`;
* adding -999 to the missing fleet, year, age, length, etc. combinations;
* running the model with a user-supplied argument of n_of_loops, where the
default is three, to restart the optimizer from the previous run of nlmimb;
* summarizing the output with the `FIMSFit()` function and class.
* Implements a switch for global verbosity within FIMS through the use
of {cli} messages and warnings.
* Updates the logging system complete with a vignette about how to use it, the
logging system can be used for both R and C++ errors, warnings, and
information.
* Creates the initial infrastructure to implement random effects with density
functions.
* Implements a helper function to get the parameter names from the
C++ code and populate the results with those names.
* Makes lpdf_vec return 0 if data is missing.
R ----
doc(FIMSFrame): Adds documentation to accessors and increased consistency
doc(ParameterVector): Adds time-varying example to the vignette that is
turned off by default but users can experiment
doc(fims-demo): Adds example of a model that is built but not fit
doc: Shares argument documentation across functions
feat(create_default_*()): Creates default values for FIMS parameters
feat(update_parameters()): Updates default values for FIMS parameters
feat(initialize_*()): Uses methods::new() to set up FIMS modules
feat(FIMSFit): Created FIMSFit as an S4 Class with [create_FIMSFit()]
so people can also create a FIMSFit object without having to use
[fit_fims()] and so the object returned by [fit_fims()] looks the
same no matter if you want the uncertainty calculated or not via
`get_sd`. Objects are not added to things to obj, opt, and report and
instead they are explicitly returned as a slot in the S4 FIMSFit class
feat(estimates): In FIMSFit
feat(verbose): Uses cli_inform cli_abort. Users can now set the global
verbose level through `options(rlib_message_verbosity = "quiet")` to stop
cli::cli_inform() messages from coming through. This allows for the
verbose argument to be removed from all functions. And,
[is_fims_verbose()] can check internally in functions to see if FIMS
is currently verbose.
fix(data1): Renamed from data_mile1 and adds length data
fix(fims-demo): Updates vignette doi Bai et al.
fix(FIMSFrame): Allows for subsetting of multiple fleets with %in%
fix(plot.FIMSFrame): Adds y and ... for plot to be properly documented
where previously we only had x, which led to scales not being seen as a
package that was needed. The methods proposed in NOAA-FIMS#672 was a work around
where this commit fixes the problem.
fix(Rcpp_Parameter*): Moves to zzz.R because when in operators it was
leading to warnings when compiling in R. The movement allows this file
to be ran before the others and it does not matter if Rcpp_Parameter or
Rcpp_ParameterVector is exported/defined. I also worked on the
formatting of those functions as well as combining the documentation
rather for similar, i.e., methods.
refactor(cli): Updates error message to use cli formatting
refactor(DESCRIPTION): Adds packages
* Adds purrr, tidyr, tibble, stats
* Removes tidyverse
* Depends on R 4.1.0 because of the use of the native pipe, which is
available in R version 4.1.0. Status-quo dependency was R 4.0.
refactor(tests): convert tests to testthat format in
test-unit-rcpp-interface-variable-vector.R
C++ ----
doc: Remove authors, email from file headers, some cleanup to cpp file
header with consistent use of @file, @brief, @details, and @copyright
for every file in inst/include and notes.
doc(mainpage): Adds mainpage for doxygen as discussed by the
documentation group led by @Bai-Li-NOAA in July (notes [here](
https://docs.google.com/document/d/1tPCSSanZ7SHaSE5SMkPoYrZh_lsswe7o5gtEyJmA0DU/edit?tab=t.0#heading=h.enmw68u5r5hm)).
doc(Parameter): Fully documents Parameter and ParameterVector matching
documentation at the function definition with what is shown in Rcpp
methods::show() inside R.
doc(pos): Uses pos in position for time-varying so it does not seem like
things can only vary with time.
feat: add variable_map infrastructure
* adds variable map as an object in information.hpp
* adds std::vector<uint32_t> key to density_components_base
* adds unique ID to VariableVector class and get_id function
* resizes key and pass to densities in rcpp_distributions
feat: Uses .estimated_m and .is_random_effect_m in interface
feat(get_force_scalar): method in fims::Vector to return the first index
if the vector is size one.
feat(get_parameter_names): Gets parameter names from C++
fix: Sets unique key for all tracked parameter/derived value in Rcpp objects
fix(information): add data error checks in information
fix(rcpp_interface): add get and set id functions to fleet interface
fix(multinomial_lpmf.hpp): make lpdf_vec to return 0 if data is missing
fix(Parameter): Removes estimated_m
fix(Makevars): Removes c++17 flag
In favor of USE_CXX17 = "yes" and removes -w flag where this fix is
known to work on Windows.
fix(clear): Removes everything because there was some information from
random effects that was not being cleared leading to crashes. Many
functions in the C++ code were also changed to CamelCase such as Clear().
Refactored function names to match style of other member functions.
clear() procedure creates a new instance of the information singleton object.
fix: Removes log_sigma_recruit from the Beverton--Holt
stock--recruitment interface because it is now a part of the
distribution associated with log_devs
fix(logging): Uses macros
* Removes old logging
* pretty format for output
* added format string for json
* created a logging vignette
* Adds information about DFIMS_DEBUG information
* Adds throw on error
fix: Collapses methods using S4 Group Generic Functions
fix: Defines methods for Ops, Math, and Summary
fix: Updates parameter min/max default values
refactor(model.hpp): Loops over all density modules to sum up joint
negative log-likelihoods
refactor: Adds i=0 in for loops because R CMD check was complaining
about significant warnings in compiling the c++ code because i was not
initialized.
refactor(information): Improves readability
refactor: Uses C++ 17
refactor: Renames SIMULATE_F to FIMS_SIMULATE_F
refactor: Renames REPORT_F to FIMS_REPORT_F
GitHub ----
chore: change actions/checkout@v3 to v4
feat: Adds call-spell-check.yml from {ghactions4r} to spellcheck with WORDLIST
fix: Adds .json to .gitignore
fix: Adds .vscode to .gitignore
fix: Removes parallel tests because they were not helpful
fix: revert sim_num to 100 to simulate 100 sets of test data
(see tests/testthat/fixtures/simulate-integration-test-data.R)
TODO: ----
* Remove code for processR in tests
* Find TODO statements in documentation and add the documentation
* think about renaming some of the Rcpp functions
* cli_* needs to be implemented throughout the package
* fix(fims-demo): Does not use returned object from fit_fims for plots
* no metadata object found to revise superClass error with sdreport class
* Add a standalone test (CI-only) for checking the speed of parallel runs
* fix parallel tests to avoid comparing run time with serial execution
Co-authored-by: Andrea-Havron-NOAA <[email protected]>
Co-authored-by: Bai-Li-NOAA <[email protected]>
Co-authored-by: ChristineStawitz-NOAA <[email protected]>
Co-authored-by: cmlegault <[email protected]>
Co-authored-by: Cole-Monnahan-NOAA <[email protected]>
Co-authored-by: JaneSullivan-NOAA <[email protected]>
Co-authored-by: iantaylor-NOAA <[email protected]>
Co-authored-by: k-doering-NOAA <[email protected]>
Co-authored-by: kellijohnson-NOAA <[email protected]>
Co-authored-by: KyleShertzer-NOAA <[email protected]>
Co-authored-by: msupernaw <[email protected]>
Co-authored-by: nathanvaughan-NOAA <[email protected]>
Co-authored-by: rklasky <[email protected]>
Part of NOAA-FIMS#170: refactor distributions_base
Part of NOAA-FIMS#388
Part of NOAA-FIMS#573: add normal_lpdf
Part of NOAA-FIMS#581: add lognormal_lpdf
Part of NOAA-FIMS#585: add multinomial_lpmf
Part of NOAA-FIMS#586
Part of NOAA-FIMS#630
Part of NOAA-FIMS#644
Part of NOAA-FIMS#645
Part of NOAA-FIMS#646
Part of NOAA-FIMS#662
Part of NOAA-FIMS#671
Part of NOAA-FIMS#695
Part of NOAA-FIMS#702
Close NOAA-FIMS#672
Close NOAA-FIMS#690
Release mq (NOAA-FIMS#533) * fix gradient warning * Add NEWS.md * make news_md and update version number * more details on MQ (v0.2.0) changes
Merge pull request NOAA-FIMS#421 from NOAA-FIMS/format-c++-code format C++ code with clang format