Skip to content

Approximation of the marginal GP #39

@javdrher

Description

@javdrher

A very cool addition would be the approximation of the marginal GP presented in https://arxiv.org/abs/1310.6740. This approach requires both the gradient as well as the Hessian of the lilkelihood w.r.t its hyperparameters which should be doable with tensorflow. The hessian however is currently a problem with r1.2 of tensorflow, as the cholesky_grad has no gradient op. I saw that in the rc for r1.3, the cholesky_grad is no longer the default gradient op for tf.cholesky, rather it is computed using tensorflow ops. I quickly tested this, the following code now runs:

import tensorflow as tf
import numpy as np

A = tf.Variable(np.zeros((10,)), dtype=tf.float32)
with tf.Session() as sess:
    Ae = tf.expand_dims(A, -1)
    Xs = tf.matmul(Ae, Ae, transpose_b=True) + 1e-2 * tf.eye(10)
    X = tf.cholesky(Xs)
    Xg = tf.hessians(X, A)
    sess.run(tf.global_variables_initializer())
    print (sess.run(Xg, feed_dict={A: np.random.rand(10)}))

So we can try this again, @nknudde could you look at this?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions