|
|
| Line 1: |
Line 1: |
| | {{DISPLAYTITLE:hessreg.m}} | | {{DISPLAYTITLE:hessreg.m}} |
| − | | + | RFO regularisation for Newton-Raphson Hessian and gradient pairs. |
| − | The function returns well conditioned Hessian matrix.
| |
| | | | |
| | ==Syntax== | | ==Syntax== |
| | | | |
| − | [H,g,data]=hessreg(H,g,reg_param,data) | + | [H,data]=hessreg(spin_system,H,g,data) |
| − | | |
| − | ==Description==
| |
| − | Returns well conditioned Hessian matrix and, if 'RFO' is used, also returns the scaled gradient. .
| |
| | | | |
| | ==Arguments== | | ==Arguments== |
| | | | |
| − | H - Hessian matrix to be regularised and conditioned.
| + | H - Hessian matrix to be regularised |
| − |
| + | |
| − | g - gradient vector to assist regularisation for the 'RFO' method.
| + | g - gradient computed at the same point as H |
| − |
| + | |
| − | reg_param - structure of regularisation options and tolerances.
| + | data - diagnostic data structure |
| − |
| |
| − | data - (optional) data structure to modify regularisation diagnostics.
| |
| − | | |
| | | | |
| | ==Returns== | | ==Returns== |
| | | | |
| − | H - Regularised and conditioned Hessian matrix
| + | H - regularised Hessian |
| − |
| + | |
| − | g - gradient vector from 'RFO' method (may occasionally change from input g).
| + | data - updated diagnostic data structure with |
| − |
| + | data.count.rfo incremented by the number |
| − | data - (optional) data structure with regularisation diagnostics if data input was supplied.
| + | of RFO iterations taken |
| − | | |
| − | ==Default Options==
| |
| − | Although these options would be automatically generated by [[optim_tols.m]] when used with [[fminnewton.m]], if the function is used separately from these functions - the following are its default options:
| |
| − | | |
| − | reg_param.method
| |
| − | | |
| − | This defines the regularisation strategy. Options are a
| |
| − | Cholesky factorisation ('CHOL'), or the eigendecomposition
| |
| − | based Rational Function Optimisation ('RFO'), Trust Region
| |
| − | regularisation ('TRM') and a reset to the identity ('reset').
| |
| − | (Default 'RFO').
| |
| − |
| |
| − | reg_param.n_reg
| |
| − |
| |
| − | Maximumnumber of cholesky factorisation trials, or conditioning
| |
| − | iterates allowed (Default 2500).
| |
| − |
| |
| − | reg_param.delta
| |
| − |
| |
| − | Used in 'TRM' and regularisation. Should be in the form
| |
| − | 0<delta and is the constant multiplied by the identity in
| |
| − | H=(H+delta*I), to shift eigenvalues. (Default 1)
| |
| − |
| |
| − | reg_param.alpha
| |
| − |
| |
| − | Used in 'RFO' and regularisation. Should be in the form
| |
| − | 0<alpha and is the uniform scaling factor. (Default 1)
| |
| − |
| |
| − | reg_param.cond_method
| |
| − |
| |
| − | Either none '', 'scaled' or 'iterative'. 'iterative' conditions
| |
| − | the hessian iteratively, reducing the factor delta to
| |
| − | reg_param.phi*alpha at every iterate (default
| |
| − | 0.9), until the condition number is less than
| |
| − | reg_param.max_cond. | |
| − |
| |
| − | reg_param.phi
| |
| − |
| |
| − | Used in 'RFO' and regularisation as the factor to reduce
| |
| − | scaling with 'iterative' conditioning. Should be 0<phi<1 for
| |
| − | 'RFO' (Default 0.9). If used with 'TRM' and 'iterative'
| |
| − | conditions, this factor increases the eigenvalue shift
| |
| − | parameter at each iterate, in this case phi>1 (no Default for
| |
| − | 'TRM').
| |
| − |
| |
| − | reg_param.max_cond
| |
| − |
| |
| − | positive number being the maximum allowed condition number of
| |
| − | the Hessian when reg_param.conditioning 'ioterative' or
| |
| − | 'scaled' are used (Default 1e4).
| |
| − | | |
| − | ==Notes==
| |
| − | If data input exists, the data output gives diagnostic information such as hessian eigenvalues, condition number, and the number of conditioning iterates.
| |
| | | | |
| | ==See also== | | ==See also== |
| Line 86: |
Line 26: |
| | | | |
| | | | |
| − | ''Version 1.9, authors: [[David Goodwin]]'' | + | ''Version 2.2, authors: [[David Goodwin]], [[Ilya Kuprov]]'' |
RFO regularisation for Newton-Raphson Hessian and gradient pairs.
Syntax
[H,data]=hessreg(spin_system,H,g,data)
Arguments
H - Hessian matrix to be regularised
g - gradient computed at the same point as H
data - diagnostic data structure
Returns
H - regularised Hessian
data - updated diagnostic data structure with
data.count.rfo incremented by the number
of RFO iterations taken
See also
hessprep.m, fminnewton.m
Version 2.2, authors: David Goodwin, Ilya Kuprov