1. A method for training a program by optimizing a set of program parameter values, comprising optimizing the parameter values using the Newton's algorithm, wherein successive updates of the parameter values are provided by a method of conjugate residuals.