similarity using gaussian kernel