Prototype optimization based on minimizing classification oriented error function