Closed DanWaxman closed 10 months ago
Thanks for the contribution, @DanWaxman! Yes, in practice, it is better to use Cholesky. Could you add an arg use_cholesky=False/True
to reflect two implementations? (the cholesky implementation rarely appears in GP textbooks.)
Done, thanks @fehiepsi! I made use_cholesky=True
the default, and used command line option --no_cholesky
due to the well-known issue of parsing bool
s using argparse
.
For the GP example, the training covariance matrix is currently inverted; it's faster and more numerically stable to use the Cholesky decomposition instead. It's a rather small change, but people tend to copy-paste examples, so I think a proper implementation is important here.
In the example, I've checked that the results are numerically similar (slightly different, I think in part to sampling):
gives