R/gptk_gpScaleBiasGradient.R

Defines functions .gpScaleBiasGradient

.gpScaleBiasGradient <-
function(model) {
  g = list()
  if (model$learnScales) {
    ## 'drop' converts row matrix to column vector by default.
    g = 1/model$scale * drop(model$innerProducts-1)
    fhandle <- get(model$scaleTransform$func, mode="function")
    g = g * fhandle(model$scale, "gradfact")
  }

  return (g)
}

Try the robin package in your browser

Any scripts or data that you put into this service are public.

robin documentation built on May 17, 2022, 1:07 a.m.