Skip to contents

Attach 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, and convergence.

check

Run fitting diagnostics after attachment.

check_args

Named arguments passed to opal_check().

Value

A fitted opal_obj.

Examples

assessment <- opal_read(system.file("extdata", "opaka_quickstart_fit.rds",
                                   package = "opal"))
#> Warning: The saved fit used opal 0.1.4; the current version is 0.1.5.
# Reattach the already verified optimum; no optimisation is performed.
assessment <- opal_attach_fit(assessment, assessment$fit$opt, check = FALSE)