This repository was archived by the owner on Dec 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Kernel Derivatives #46
Copy link
Copy link
Open
Labels
Description
There's two components to this enhancement.
Optimization
Define a theta and eta (inverse theta) function to transform parameters between an open bounded interval to a closed bounded interval (or eliminate the bounds entirely) for use in optimization methods. This is similar to how link functions work in logistic regression - unconstrained optimization is used to set a parameter value in the interval (0,1) using the logit link function.
-
theta- given an interval and a value, applies a transformation that eliminates finite open bounds -
eta- given an interval and a value, reverses the value back to the original parameter space -
getthetareturns the theta transformed variable when applied toHyperParametersand a vector of theta transformed variables when used on aKernel -
settheta!this function is used to updateHyperParameters orKernels given a vector of theta-transformed variables -
checkthetaused to check if the provided vector (or scalar if working with a HyperParameter) is a valid update -
upperboundthetareturns the theta-transformed upper bound. For example, in the case that a parameter is restricted to (0,1], the transformed upper bound will be log(1) -
lowerboundthetareturns the theta-transformed lower bound. For example, in the case that a parameter is restricted to (0,1], the transformed lower bound will be -Infinity
Derivatives
Derivatives will be with respect to theta as described above.
-
gradetaderivative ofetafunction. Using chain rule, this is applied togradkappato get the derivative with respect to theta. Not exported. -
gradkappaderivative of the scalar part of aKernel. This must be defined for each kernel. It will be manual, so the derivative will be analytical or a hand coded numerical derivative. It will only be defined for parameters of the kernel. Not exported. Ex.dkappa(k, Val{:alpha}, z) -
gradkernelderivative ofkernel. Second argument will be the variable the derivative is with respect to. A value type with the field name as a parameter will be used. Ex.dkernel(k, Val{:alpha}, x, y) -
gradkernelmatrixderivative matrix.