Closed sourish-cmi closed 1 year ago
Yes, you need to initialise MeanLin with a vector of coefficients. The length of the vector should be the number of dimensions of X.
Thanks, the following code works.
β_hat = StatsBase.coef(mod1.model)[2:1:(p+1)]
mLin = MeanLin(β_hat);
kern = Matern(3/2,zeros(p),0.0); # Matern 3/2 ARD kernel (note that hyperparameters are on the log scale)
gp2 = GP(X',y,mLin,kern);
optimize!(gp2)
Thanks again. Closing the issue.
I tried the following with
MeanLin
instead ofMeanZero
. All the examples are withMeanZero
:It gives me the following error:
How can I use Linear Mean function as you have in your documentation here.