def chi2_kernel(X, Y=None, gamma=1.0):
 K = additive_chi2_kernel(X, Y)
 K *= gamma
 return np.exp(K, K)

def chi2_kernel ( X , Y = None , gamma = 1.0 ) : K = additive_chi2_kernel ( X , Y ) K *= gamma return np . exp ( K , K )
computes the exponential chi-squared kernel x and y .