Learn R Programming

BBmisc (version 1.13)

optimizeSubInts: Naive multi-start version of optimize for global optimization.

Description

The univariate optimize can stop at arbitrarily bad points when f is not unimodal. This functions mitigates this effect in a very naive way: interval is subdivided into nsub equally sized subintervals, optimize is run on all of them (and on the original big interval) and the best obtained point is returned.

Usage

optimizeSubInts(
  f,
  interval,
  ...,
  lower = min(interval),
  upper = max(interval),
  maximum = FALSE,
  tol = .Machine$double.eps^0.25,
  nsub = 50L
)

Value

See optimize.

Arguments

f

See optimize.

interval

See optimize.

...

See optimize.

lower

See optimize.

upper

See optimize.

maximum

See optimize.

tol

See optimize.

nsub

[integer(1)]
Number of subintervals. A value of 1 implies normal optimize behavior. Default is 50L.