I am just using the LinearInterpolation()
object from Interpolations.jl
. I think it is a BSpline with degree 1.
I honestly do not know gradients are being computed. My guess is the package is fully compatible with ForwardDiff.jl
so it should provide it automatically. (I might be wrong here)
code snippet from the package documentation below. I have 8 of these interpolation objects as inputs to the model.
xs = 1:0.2:5
A = [f(x) for x in xs]
# linear interpolation
interp_linear = LinearInterpolation(xs, A)