Add a function to calculate the scale factor.
Update MVA_trainer to new input/output format.