Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

optimal_params

Optimization of the hyperparameters


Description

Optimization of the hyperparameters using a sequence of subfunctions.

Usage

optimal_params     (expt, LoF, start_hp, option = "a", ...)
optimal_B          (expt, LoF, start_hp, option = "a", verbose=FALSE, ...)
optimal_identical_B(expt, LoF, start_hp, verbose=FALSE, ...)
optimal_diag_M     (expt, LoF, start_hp)
optimal_M          (expt, LoF, start_hp, ...)

Arguments

expt

Object of class experiment

LoF

List of functions

start_hp

Start value for the hyperparameters, an object of class mhp. The various optimization routines use the different parts of start_hp as start points, and incrementally update it

option

In function optimal_B() and consequently optimal_params(), a character indicating whether to allow the scales to differ or not.

  • Default option “a” is the simplest: each univariate B matrix is a multiple of the identity matrix.

  • Option “b” allows the B matrices to be any (positive definite) diagonal matrix.

  • Option “c” specifies that B[,,j] is diagonal for each j and furthermore that B[i,i,1]=B[i,i,2]=...=B[i,i,r]. This option calls optimal_identical_B().

verbose

In function optimal_B(), Boolean with TRUE meaning to print debugging information and default FALSE meaning not to print anything

...

Further arguments passed to the optimization routine

Details

The user-friendly wrapper function is optimal_params(). This calls function optimal_B() first, as most of the analysis is conditional on B. Then optimal_diag_M() is called; this places the maximum likelihood estimate for sigma^2 on the diagonal of M. Finally, optimal_M() is called, which assigns the off-diagonal elements of M.

Each of the subfunctions returns an object appropriate for insertion into a mhp object.

The “meat” of optimal_params() is

B(out)  <- optimal_B     (mm, d, LoF, start_hp=out, option=option, ...)
  diag(M(out)) <- optimal_diag_M(mm, d, LoF, start_hp=out, ...)
       M(out)  <- optimal_M     (mm, d, LoF, start_hp=out, ...)
  return(out)

See how object out is modified sequentially, it being used as a start point for the next function.

Value

Returns a mhp object.

Note

Function optimal_diag_M() uses MLEs for the diagonals, but using each type of observation separately. It is conceivable that there is information that is not being used here.

Author(s)

Robin K. S. Hankin

Examples

data(mtoys)

optimal_params(toy_expt,toy_LoF,toy_mhp,option='c',control=list(maxit=1))

multivator

A Multivariate Emulator

v1.1-10
GPL-2
Authors
Robin K. S. Hankin [aut, cre] (<https://orcid.org/0000-0001-5982-0415>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.