R/gpScaleBiasGradient.R

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 gptk package in your browser

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

gptk documentation built on May 2, 2019, 3:27 p.m.