Minor fixes

Sign error in perceptron loss computation.
Round number counting in EM.
Switched to L2 distance for convergence check in EM.