Utilizes stats::optim to obtain parameter estimates. Requires that the objective function and its derivative are defined by the calling learning method. Returns NULL if optimization is not successful due to problems; a vector of the current parameter estimates if optimization is not successful because it hit the maximum number if iterations; and the list object returned by stats::optim if optimization is successful