-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Working with arbitrary multivariate mean #240
Comments
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? |
@willtebbutt Take a look at this code : Here Also, I discovered that if the mean function is expressed in terms of matrix operations, it works fine.
|
Ahhh It's an AD issue. The way to solve it is to implement 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: