Strictly speaking, ransoming would almost always be the better option (I don´t do it often, though), as you get back your surviving veteran soldiers. And valour is never lost, but tracked by the game on a per soldier basis, according to the Beginners Guide. There is also an option to create logfiles showing it. So, while it seems like the valour rating of a unit goes down after retraining, that is only the average valour. So, especially if you have a veteran unit, or one that heroically fought before routing, you should consider ransoming those few surviving killing machines.