kgof/kernel.py
def gradX_y(self, X, y):
        """
        Compute the gradient with respect to X (the first argument of the
        kernel). Base class provides a default autograd implementation for convenience.
        Subclasses should override if this does not work.

        X: nx x d numpy array.
        y: numpy array of length d.

        Return a numpy array G of size nx x d, the derivative of k(X, y) with
        respect to X.
        """
        return sum(w * k.gradX_y(X, y) for w, k in zip(self.wts, self.ks))

        Compute the gradient with respect to X (the first argument of the
        kernel). Base class provides a default autograd implementation for convenience.
        Subclasses should override if this does not work.

        X: nx x d numpy array.
        y: numpy array of length d.

        Return a numpy array G of size nx x d, the derivative of k(X, y) with
        respect to X.
        
Compute the gradient with respect to X (the first argument of the
kernel). Base class provides a default autograd implementation for convenience.
Subclasses should override if this does not work.

nx x d numpy array.
y: numpy array of length d.

Return a numpy array G of size nx x d, the derivative of k(X, y) with
respect to X.
Compute the gradient with respect to X ( the first argument of the kernel ) . Base class provides a default autograd implementation for convenience . Subclasses should override if this does not work . nx x d numpy array . y : numpy array of length d . Return a numpy array G of size nx x d the derivative of k ( X y ) with respect to X .
def gradX_y(self, X, y):
        return sum(w * k.gradX_y(X, y) for w, k in zip(self.wts, self.ks))
def gradX_y ( self , X , y ) : return sum ( w * k . gradX_y ( X , y ) for w , k in zip ( self . wts , self . ks ) )
Compute the gradient with respect to X (the first argument of the
kernel).
Compute the gradient with respect to X ( the first argument of the kernel ) .
"""
        Compute the gradient with respect to X (the first argument of the
        kernel). Base class provides a default autograd implementation for convenience.
        Subclasses should override if this does not work.

        X: nx x d numpy array.
        y: numpy array of length d.

        Return a numpy array G of size nx x d, the derivative of k(X, y) with
        respect to X.
        """
self
X
y