Constrained parameter estimation for semi-supervised learning: The case of the nearest mean classifier