Distance and Kernel Methods