hard assignment to classes now done in Dataset rather than here
overflow in logToProb fixed in a super-hacky way. EM seems to work now.