using max instead of min
if Kxy is kernelised then the score will flip at x-axis
edit main to use ferret