Add training for linear metric using batched SGD