c15-4 (779588), страница 4
Текст из файла (страница 4)
Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).}15.5 Nonlinear Models681Lawson, C.L., and Hanson, R. 1974, Solving Least Squares Problems (Englewood Cliffs, NJ:Prentice-Hall).Forsythe, G.E., Malcolm, M.A., and Moler, C.B. 1977, Computer Methods for MathematicalComputations (Englewood Cliffs, NJ: Prentice-Hall), Chapter 9.We now consider fitting when the model depends nonlinearly on the set of Munknown parameters ak , k = 1, 2, . . ., M . We use the same approach as in previoussections, namely to define a χ2 merit function and determine best-fit parametersby its minimization.
With nonlinear dependences, however, the minimization mustproceed iteratively. Given trial values for the parameters, we develop a procedurethat improves the trial solution. The procedure is then repeated until χ2 stops (oreffectively stops) decreasing.How is this problem different from the general nonlinear function minimizationproblem already dealt with in Chapter 10? Superficially, not at all: Sufficientlyclose to the minimum, we expect the χ2 function to be well approximated by aquadratic form, which we can write as1χ2 (a) ≈ γ − d · a + a · D · a2(15.5.1)where d is an M -vector and D is an M × M matrix.
(Compare equation 10.6.1.)If the approximation is a good one, we know how to jump from the current trialparameters acur to the minimizing ones amin in a single leap, namelyamin = acur + D−1 · −∇χ2 (acur )(15.5.2)(Compare equation 10.7.4.)On the other hand, (15.5.1) might be a poor local approximation to the shapeof the function that we are trying to minimize at acur . In that case, about all wecan do is take a step down the gradient, as in the steepest descent method (§10.6).In other words,anext = acur − constant × ∇χ2 (acur )(15.5.3)where the constant is small enough not to exhaust the downhill direction.To use (15.5.2) or (15.5.3), we must be able to compute the gradient of the χ2function at any set of parameters a.
To use (15.5.2) we also need the matrix D, whichis the second derivative matrix (Hessian matrix) of the χ2 merit function, at any a.Now, this is the crucial difference from Chapter 10: There, we had no way ofdirectly evaluating the Hessian matrix. We were given only the ability to evaluatethe function to be minimized and (in some cases) its gradient. Therefore, we hadto resort to iterative methods not just because our function was nonlinear, but alsoin order to build up information about the Hessian matrix.
Sections 10.7 and 10.6concerned themselves with two different techniques for building up this information.Sample page from NUMERICAL RECIPES IN C: THE ART OF SCIENTIFIC COMPUTING (ISBN 0-521-43108-5)Copyright (C) 1988-1992 by Cambridge University Press.Programs Copyright (C) 1988-1992 by Numerical Recipes Software.Permission is granted for internet users to make one paper copy for their own personal use. Further reproduction, or any copying of machinereadable files (including this one) to any servercomputer, is strictly prohibited. To order Numerical Recipes books,diskettes, or CDROMsvisit website http://www.nr.com or call 1-800-872-7423 (North America only),or send email to trade@cup.cam.ac.uk (outside North America).15.5 Nonlinear Models.















