I am trying to adapt the gpflow GP regression example (https://gpflow.readthedocs.io/en/develop/notebooks/basics/regression.html) to my own data. I have 100 model runs, each with 10 parameters in an array: modelled_params (100,10). Each model then has a score in an array: area_score (100,1).
My code is:
k = gpflow.kernels.Matern52(active_dims=[0]) + gpflow.kernels.Matern52(active_dims=[1]) \
+ gpflow.kernels.Matern52(active_dims=[2]) + gpflow.kernels.Matern52(active_dims=[3]) \
+ gpflow.kernels.Matern52(active_dims=[4]) + gpflow.kernels.Matern52(active_dims=[5]) \
+ gpflow.kernels.Matern52(active_dims=[6]) + gpflow.kernels.Matern52(active_dims=[7]) \
+ gpflow.kernels.Matern52(active_dims=[8]) + gpflow.kernels.Matern52(active_dims=[9])
#build and optimise model model - change method and kernel later
m = gpflow.models.GPR(data=(modelled_params,area_score), kernel=k, mean_function=None)
# for some reason get a matrix inversion problem at this stage
opt=gpflow.optimizers.Scipy()
opt_logs = opt.minimize(m.training_loss, variables=m.trainable_variables, options=dict(maxiter=1000))
This throws up the following error: InvalidArgumentError: Input matrix is not invertible. [[node gradient_tape/triangular_solve/MatrixTriangularSolve (defined at site-packages/gpflow/optimizers/scipy.py:146) ]] [Op:__inference__tf_eval_2362]
Errors may have originated from an input operation. Input Source operations connected to node gradient_tape/triangular_solve/MatrixTriangularSolve: Cholesky (defined at site-packages/gpflow/models/gpr.py:73)
Function call stack: _tf_eval
Previous attempts on 70 by 2 arrays have not had this inversion error.
Any help on overcoming this appreciated.
Thanks, Jeremy.