带选项的Matlab lsqnonlin拟合问题

带选项的Matlab lsqnonlin拟合问题,matlab,solver,model-fitting,Matlab,Solver,Model Fitting,很确定Matlab只是忽略了我的解算器选项设置。。。我正在将功能公差从默认的1e-6设置为1e-10,解算器在1e-8处停止,告诉我它低于默认的1e-6限制 我使用的命令是options=optimoptions('lsqnonlin','FunctionTolerance',1e-10)。有什么想法吗 命令窗口输出如下: options = lsqnonlin options: Options used by current Algorithm ('trust-region-r

很确定Matlab只是忽略了我的解算器选项设置。。。我正在将
功能公差
从默认的
1e-6
设置为
1e-10
,解算器在
1e-8
处停止,告诉我它低于默认的
1e-6
限制

我使用的命令是
options=optimoptions('lsqnonlin','FunctionTolerance',1e-10)
。有什么想法吗

命令窗口输出如下:

options = 

  lsqnonlin options:

   Options used by current Algorithm ('trust-region-reflective'):
   (Other available algorithms: 'levenberg-marquardt')

   Set properties:
           FunctionTolerance: 1.0000e-10

   Default properties:
                   Algorithm: 'trust-region-reflective'
              CheckGradients: 0
                     Display: 'final'
    FiniteDifferenceStepSize: 'sqrt(eps)'
        FiniteDifferenceType: 'forward'
         JacobianMultiplyFcn: []
      MaxFunctionEvaluations: '100*numberOfVariables'
               MaxIterations: 400
         OptimalityTolerance: 1.0000e-06
                   OutputFcn: []
                     PlotFcn: []
    SpecifyObjectiveGradient: 0
               StepTolerance: 1.0000e-06
         SubproblemAlgorithm: 'factorization'
                    TypicalX: 'ones(numberOfVariables,1)'
                 UseParallel: 0


Local minimum possible.

lsqnonlin stopped because the final change in the sum of squares relative to 
its initial value is less than the default value of the function tolerance.

<stopping criteria details>

Optimization stopped because the relative sum of squares (r) is changing
by less than options.FunctionTolerance = 1.000000e-06.

Optimization Metric                                  Options
relative change r =   6.50e-08             FunctionTolerance =   1e-06 (default)
选项=
lsqnonlin选项:
当前算法使用的选项(“信任区域-反射”):
(其他可用算法:“levenberg-marquardt”)
设置属性:
功能公差:1.0000e-10
默认属性:
算法:“信赖域反射”
检查梯度:0
显示:“最终”
有限差分步长:“sqrt(eps)”
FinitedDifferenceType:“转发”
Jacobian MultiplyFcn:[]
MaxFunctionEvaluations:'100*numberOfVariables'
最大迭代次数:400
最佳耐受性:1.0000e-06
OutputFcn:[]
PlotFcn:[]
指定的对象范围:0
步进公差:1.0000e-06
子问题算法:“因式分解”
TypicalX:'一(numberOfVariables,1)'
UseParallel:0
可能的局部最小值。
lsqnonlin停止,因为相对于
其初始值小于功能公差的默认值。
优化已停止,因为相对平方和(r)正在更改
小于选项。函数公差=1.000000e-06。
优化度量选项
相对变化r=6.50e-08功能公差=1e-06(默认值)

命令
options=optimoptions('lsqnonlin','FunctionTolerance',1e-10)
本身不会更改设置

options
是一个变量,其中包含一些设置参数,必须传递到函数调用中才能主动更改参数


optimizedParameters=lsqnonlin(函数最小化,初始参数,[],[],[]选项)
尝试减少
finitedDifferenceStepSize
,例如

options = optimoptions('lsqnonlin', 'FunctionTolerance', 1e-10, 'FiniteDifferenceStepSize',1e-6)

甚至更小的有限差分步长。

函数公差
不是
lsqnonlin
的选项。使用
TolFun
代替不起作用的方法。从我看来,它是同义词。那是函数值、步长、最大梯度范数还是其他什么?这可以停止迭代。@Troy我改变了一切,遇到了同样的问题。我已经意识到现在的问题是什么。。。我会发布一个答案。