Large-margin embedding