
Attach an externally optimised Opal fit
opal_attach_fit.RdAttach a result from an external optimiser to the configuration that produced
it. The objective, parameter layout, and bounds are verified before retaining
the point. For ordinary optimisation, use opal_fit().
Usage
opal_attach_fit(x, opt, check = TRUE, check_args = list())Arguments
- x
A configured
opal_obj.- opt
Optimiser result with named
par,objective, andconvergence.- check
Run fitting diagnostics after attachment.
- check_args
Named arguments passed to
opal_check().
See also
Other assessment workflow:
opal_attach_mcmc(),
opal_build(),
opal_check(),
opal_derived(),
opal_example_inputs(),
opal_fit(),
opal_from_fit(),
opal_io,
opal_mcmc(),
opal_obj(),
opal_posterior(),
opal_project(),
opal_report(),
opal_update()
Examples
assessment <- opal_read(system.file("extdata", "opaka_quickstart_fit.rds",
package = "opal"))
#> Warning: The saved fit runtime identity differs because it was serialized under a different R version; verifying by rebuild.
#> Warning: The saved fit runtime identity differs because it was serialized under a different R version; verifying by rebuild.
#> Warning: The opal_model implementation checksum differs from the saved fit. The saved fit used opal 0.0.4; the current version is 0.1.1.
# Reattach the already verified optimum; no optimisation is performed.
assessment <- opal_attach_fit(assessment, assessment$fit$opt, check = FALSE)
#> Warning: The model implementation checksum differs from the saved object.
#> Warning: The model implementation checksum differs from the saved object.
#> Warning: The model implementation checksum differs from the saved object.