Developer Reference for Intel® oneAPI Math Kernel Library for Fortran
A newer version of this document is available. Customers should click here to go to the newest version.
?trnlsp_solve
Solves a nonlinear least squares problem using the TR algorithm.
Syntax
res = strnlsp_solve(handle, fvec, fjac, RCI_Request)
res = dtrnlsp_solve(handle, fvec, fjac, RCI_Request)
Include Files
- Fortran: mkl_rci.fi, mkl_rci.f90
 
Description
The ?trnlsp_solve routine uses the TR algorithm to solve nonlinear least squares problems.
The problem is stated as follows:
 
   where
F(x):Rn → Rm
m ≥ n
 
   to get xnew = xcurrent + s that satisfies
 
   where
J(x) is the Jacobian matrix
s is the trial step
||s||2 ≤ Δcurrent
Δ is the trust-region area.
The RCI_Request parameter provides additional information:
RCI_Request Value  |  
        Description  |  
       
|---|---|
2  |  
        Request to calculate the Jacobian matrix and put the result into fjac  |  
       
1  |  
        Request to recalculate the function at vector X and put the result into fvec  |  
       
0  |  
        One successful iteration step on the current trust-region radius (that does not mean that the value of x has changed)  |  
       
-1  |  
        The algorithm has exceeded the maximum number of iterations  |  
       
-2  |  
        Δ < eps(1)  |  
       
-3  |  
        ||F(x)||2 < eps(2)  |  
       
-4  |  
        The Jacobian matrix is singular. ||J(x)(1:m,j)||2 < eps(3), j = 1, ..., n  |  
       
-5  |  
        ||s||2 < eps(4)  |  
       
-6  |  
        ||F(x)||2 - ||F(x) - J(x)s||2 < eps(5)  |  
       
If it is possible to combine computations of the function and the jacobian (RCI_Request = 1 and 2), you can do that and provide both updated values for fvec and fjac as fulfillment of RCI_Request =1 (and do nothing for RCI_Request = 2).
Input Parameters
- handle
 -  
     
Type INTEGER*8.
 - fvec
 -  
     
REAL for strnlsp_solve
DOUBLE PRECISION for dtrnlsp_solve
Array of size m. Contains the function values at X, where fvec(i) = (yi – fi(x)).
 - fjac
 -  
     
REAL for strnlsp_solve
DOUBLE PRECISION for dtrnlsp_solve
Array of size m by n. Contains the Jacobian matrix of the function.
 
Output Parameters
- fvec
 -  
     
REAL for strnlsp_solve
DOUBLE PRECISION for dtrnlsp_solve
Array of size m. Updated function evaluated at x.
 - RCI_Request
 -  
     
INTEGER. Informs about the task stage.
See the Description section for the parameter values and their meaning.
 - res
 -  
     
INTEGER. Indicates the task completion.
res = TR_SUCCESS - the routine completed the task normally.
TR_SUCCESS is defined in the mkl_rci.fi include file.