glimix_core/cov/_kron2sum.py
def gradient(self):
        """
        Gradient of K.

        Returns
        -------
        C0 : ndarray
            Derivative of C₀ over its parameters.
        C1 : ndarray
            Derivative of C₁ over its parameters.
        """
        self._init_svd()
        C0 = self._C0.gradient()["Lu"].T
        C1 = self._C1.gradient()["Lu"].T
        grad = {"C0.Lu": kron(C0, self._X).T, "C1.Lu": kron(C1, self._I).T}
        return grad
def gradient(self):
        """
        Gradient of K.

        Returns
        -------
        C0 : ndarray
            Derivative of C₀ over its parameters.
        C1 : ndarray
            Derivative of C₁ over its parameters.
        """
        self._init_svd()
        C0 = self._C0.gradient()["Lu"].T
        C1 = self._C1.gradient()["Lu"].T
        grad = {"C0.Lu": kron(C0, self._X).T, "C1.Lu": kron(C1, self._I).T}
        return grad
def gradient ( self ) : self . _init_svd ( ) C0 = self . _C0 . gradient ( ) [ "Lu" ] . T C1 = self . _C1 . gradient ( ) [ "Lu" ] . T grad = { "C0.Lu" : kron ( C0 , self . _X ) . T , "C1.Lu" : kron ( C1 , self . _I ) . T } return grad
Gradient of K.

        Returns
        -------
        C0 : ndarray
            Derivative of C₀ over its parameters.
        C1 : ndarray
            Derivative of C₁ over its parameters.
Gradient of K .