computeKernelMatrix function

Computing the kernel matrix