You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to define a arbitrary multivariate mean GP as:
function g(X)
x = X[:,1]; z = X[:,2];
x +z
end
f = stretch(GP(X->g(X),SEKernel()),1 / l);
a = randn(2,N_train)
X = ColVecs(a) # Converting the matrix into a multi-column object
However, I am not able to optimise the hyper parameters and getting the following error:
BoundsError: attempt to access 2-element view(::Matrix{Float64}, :, 1) with eltype Float64 at index [1:2, 2]
Where can I find any example of doing this?
The text was updated successfully, but these errors were encountered:
Thanks for opening this @parikshit-pareek . Could you please provide a full copy of your stack trace so that I can get a better idea of where the problem might be coming from?
The way to solve it is to implement _map_meanfunction(::CustomMean{typeof(g)}, ::ColVecs) using something like the matrix operations that you've described above. e.g.
function AbstractGPs._map_meanfunction(::CustomMean{typeof(g)}, x::ColVecs)
X = x.X
return<some operations on X that returns a vector of length `length(x)`>end
This is the most important operation on a mean function anyway, so it's a good idea to implement this if you at all care about performance.
I am attempting to define a arbitrary multivariate mean GP as:
However, I am not able to optimise the hyper parameters and getting the following error:
BoundsError: attempt to access 2-element view(::Matrix{Float64}, :, 1) with eltype Float64 at index [1:2, 2]
Where can I find any example of doing this?
The text was updated successfully, but these errors were encountered: