Skip to contents

Generate a set of random hyper-parameters, specific to the chosen type of kernel, under the format that is used in Magma.


  kern = "SE",
  list_ID = NULL,
  list_hp = NULL,
  noise = FALSE,
  common_hp = FALSE



A function, or a character string indicating the chosen type of kernel among:

  • "SE": the Squared Exponential kernel,

  • "LIN": the Linear kernel,

  • "PERIO": the Periodic kernel,

  • "RQ": the Rational Quadratic kernel. Compound kernels can be created as sums or products of the above kernels. For combining kernels, simply provide a formula as a character string where elements are separated by whitespaces (e.g. "SE + PERIO"). As the elements are treated sequentially from the left to the right, the product operator '*' shall always be used before the '+' operators (e.g. 'SE * LIN + RQ' is valid whereas 'RQ + SE * LIN' is not).

In case of a custom kernel function, the argument list_hp has to be provided as well, for designing a tibble with the correct names of hyper-parameters.


A vector, associating an ID value with each individual for whom hyper-parameters are generated. If NULL (default) only one set of hyper-parameters is return without the ID column.


A vector of characters, providing the name of each hyper-parameter, in case where kern is a custom kernel function.


A logical value, indicating whether a 'noise' hyper-parameter should be included.


A logical value, indicating whether the set of hyper-parameters is assumed to be common to all individuals.


A tibble, providing a set of random hyper-parameters associated with the kernel specified through the argument kern.


#> [1] TRUE