|
OPTIMIZEName:
Minimization can be either unconstrained or constrained. Constrained minimization limits the domain of the variables that define the function. The OPTIMIZE command currently only supports unconstrained minimization. Finding the maximum of a function is equivalent to finding the minimum of the negative of a function. Therefore, the OPTIMIZE command can be used to find the maximum of a function as well (simply take the negative of the relevant function). Multivariate functions may have many local minimum and maximum. Although the goal is typically to find the global minimum (or maximum), most numerical techniques may in fact find a local minimum (or maximum) point. If something is known about the function, specifying better starting values can sometimes alleviate this problem. Specifying starting values is discussed below. There are optimization techniques, such as simulated annealing, that attempt to avoid the problem of finding a local rather than a global minimum. Dataplot does not currently support any of these global optimization techniques.
where <func> is the name of a previously defined function or a functional expression; <var> is the variable for which the optimization is being computed; <lower> is a number or parameter defining the lower limit for finding the minimum; <upper> is a number or parameter defining the upper limit for finding roots; <par> is a parameter where the value of <var> at the minimum is stored. This syntax minimizes a univariate function.
where <func> is the name of a previously defined function or a functional expression; <var-list> is a list of variables for which the minimization is being computed; <var> is a variable where the values of <var-list> at the minimum are stored. This syntax minimizes a multivariate function.
LET A = OPTIMIZE X**2 +Y**2 - X*Y WRT X Y
LET FUNCTION F1 = X**2 + Y**2 - X*Y
The FMIN routine was written by R. Brent and uses a combination of golden section search and successive parabolic interpolation. The UNCMIN package is designed to incorporate a number of different variations of quasi-Newton (also known as variable metric) approaches to unconstrained optimization. See the Dennis and Schnabel or chapter 10 of Numerical Recipes for a more detailed discussion of these issues. Specifically, the UNCMIN routines allow the following variations of the method.
This results in 18 (3*2*3) methods. This effectively is 15, as using numerical first derivative with analytic updating of the Hessian matrix is unrealistic. Dataplot only supports numerical approximations for the first derivatives and the Hessian matrix, so this reduces to six methods (three types of global strategy and two types of approximation for the Hessian matrix). You can use the following command to specify which of the six methods to use in Dataplot:
The default is LINE and FINITE. Note that optimization of functions is an area of much mathematical research and there are a number of other approaches to optimization (e.g., Nelder-Meld simplex, conjugate gradient methods) as well (not currently supported in Dataplot). Each of these methods have advantages and disadvantages. The UNCMIN procedures are intended for to small to moderate size problems. Problems with a large number of variables typically require sparse matrix techniques which are not currently implemented in Dataplot. In general, the UNCMIN routines provide good results for a broad class of problems. However, there will be some problems for which they may not work well.
The followng example shows how to specify the starting values.
LET X = 0.1 LET Y = 0.1 LET A = OPTIMIZE F1 WRT X Y
The 2016/09 version of Dataplot introduced a new feature called "function blocks". This feature allows you to use various LET subcommands in defining your function. Specifically, this allows us to now define many of the functions that are needed in many statistical applications. To see how function blocks are defined and used, enter HELP FUNCTION BLOCKS. This gives several examples of using function blocks with the OPTIMIZE command.
The following parameters can be specified when minimizing a function:
Note that default values of 0 imply that the UNCMIN will determine the default and this default may be dependent on the particular function being optimized.
For multivariate optimization, the following information is written to files.
DPST2F.DAT - The Hessian matrix.
R. P. Brent (1973), "Algorithms for Minimization Without Derivatives", Prentice-Hall. J. E. Dennis, Jr. and Dennis B. Schnabel (1996), "Numerical Methods for Unconstrained Optimization and Nonlinear Equations", SIAM. R. B. Schnabel, J. E. Koontz, and B. E. Weiss (1982), "A Modular System of Algorithms for Unconstrained Optimization", Report Cu-CS-240-82, Computer Science Department, University of Colorado. Press, Teukolsky, Vetterling, and Flannery (1992), "Numerical Recipes in Fortran: The Art of Scientific Programming", 2nd, ed., Cambridge University Press.
2015/09: Added support for function blocks. 2015/09: Added the SET OPTIMIZE <MINIMUM/MAXIMUM> command.
PLOT F FOR X = -10 0.01 10 LET A = OPTIMIZE F WRT X FOR X = -10 10 LET X = DATA A LET Y = F LET OPTVALUE = Y(1) JUSTIFICATION CENTER MOVE 50 5 TEXT MINIMUM OF ^OPTVALUE AT X = ^A
3D-PLOT F FOR X = -3 0.1 3 FOR Y = -3 0.1 3 OPTIMIZATION METHOD LINE BFGS LET XPTS = OPTIMIZE F WRT X Y LET X1 = XPTS(1) LET Y1 = XPTS(2) JUSTIFICATION CENTER MOVE 50 5 TEXT MINIMUM OF ^OPTVALUE AT X = ^X1 AND Y = ^Y1
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 06/05/2001 |