Add metric interface, add polynomial kernel.