📄 twospsaconstrained.m
字号:
% J.C. Spall, Aug. 1998
% twospsaconstrained
% Code for evaluation of second-order SPSA (2SPSA) versus first-order
% SPSA (1SPSA, as in Chap. 7 of ISSO). Code is for comparative evaluation purposes; hence,
% it includes much that is not required for a basic implementation. Further, it is
% in no way "optimized" for efficiency or generality; this is strictly research
% code for the purpose of getting a basic idea of how 2SPSA works.
% Code includes the capability for initializing 2SPSA by running 1SPSA for
% N measurements. This code allows for averaging of the
% SP gradients and Hessian estimates at EACH iteration after the initial (N)
% measurements where only 1SPSA is used for estimating theta. We use "theta"
% for the 2SPSA recursion. Code allows for checking for simple constraint
% violation (componentwise constraints).
%
% UPDATE MAR. 2006: Feedback and weighting versions of this code are available from the author;
% this can generally provide enhanced performance. (Reference: Spall, J. C. (2006), 揊eedback and Weighting Mechanisms
% for Improving Jacobian (Hessian) Estimates in the Adaptive Simultaneous Perturbation Algorithm,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -