distance from margin metric (needs testing)