kgof/kernel.py
def eval(self, X, Y):
        """
        Evaluate the kernel on data X and Y
        X: nx x d where each row represents one point
        Y: ny x d
        return nx x ny Gram matrix
        """
        dot = np.dot(X, Y.T)
        gamma = 1/X.shape[1] if self.gamma is None else self.gamma
        return (gamma * dot + self.coef0) ** self.degree

        Evaluate the kernel on data X and Y
        X: nx x d where each row represents one point
        Y: ny x d
        return nx x ny Gram matrix
        
Evaluate the kernel on data X and Y
X: nx x d where each row represents one point
Y: ny x d
return nx x ny Gram matrix
Evaluate the kernel on data X and Y X : nx x d where each row represents one point Y : ny x d return nx x ny Gram matrix
def eval(self, X, Y):
        dot = np.dot(X, Y.T)
        gamma = 1/X.shape[1] if self.gamma is None else self.gamma
        return (gamma * dot + self.coef0) ** self.degree
def eval ( self , X , Y ) : dot = np . dot ( X , Y . T ) gamma = 1 / X . shape [ 1 ] if self . gamma is None else self . gamma return ( gamma * dot + self . coef0 ) ** self . degree
Evaluate the kernel on data X and Y
X: nx x d where each row represents one point
Y: ny x d
return nx x ny Gram matrix
Evaluate the kernel on data X and Y X : nx x d where each row represents one point Y : ny x d return nx x ny Gram matrix
"""
        Evaluate the kernel on data X and Y
        X: nx x d where each row represents one point
        Y: ny x d
        return nx x ny Gram matrix
        """
self
X
Y