optifix: Optimise with fixed parameters

Description Usage Arguments Examples

View source: R/utils.R

Description

Optimise with fixed parameters

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
optifix(
  par,
  fixed,
  fn,
  gr = NULL,
  ...,
  method = c("Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN"),
  lower = -Inf,
  upper = Inf,
  control = list(),
  hessian = FALSE
)

Arguments

par

paramters

fixed

boolean

fn

function

gr

gradient of the function

...

additional parameters related to the fn and gr functions.

method

optimization method

lower

lower bounds.

upper

upper bounds.

control

list of controls.

hessian

boolean. Return the Hessian.

Examples

1
2
3
fn = function(t){(2 - t[1] + t[2])^2 + 2*(3 - t[3])^4}
th = c(1,1,1)
opt = optifix(th,fixed = c(TRUE, FALSE, FALSE), fn = fn, method = "Nelder-Mead")

ick003/GPspt documentation built on March 16, 2020, 3:34 a.m.