如何解释matlab lsqnonlin输出显示?
我正在用matlab中的lsqnonlin拟合一个具有不同数量浮动参数的函数如何解释matlab lsqnonlin输出显示?,matlab,function-fitting,Matlab,Function Fitting,我正在用matlab中的lsqnonlin拟合一个具有不同数量浮动参数的函数 Norm of First-order Iteration Func-count f(x) step optimality 0 24 17492.8 9.07e+05 1
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
第一个拟合产生更好的拟合,resnorm为2.5。matlab显示:
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
第二个配件的resnorm为3.6。matlab显示:
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
Norm of First-order
Iteration Func-count f(x) step optimality
0 38 17492.8 9.07e+05
1 76 158.945 0.112853 3.12e+04
2 114 31.4081 0.296493 9.11e+03
3 152 8.51237 0.171055 627
4 190 4.73721 0.485675 1.01e+03
5 228 4.25786 0.268581 121
6 266 3.82232 0.424431 12.9
7 304 3.67385 0.483489 13
8 342 3.65582 0.290754 21
9 380 3.64699 0.331376 25.9
10 418 3.64327 0.237147 16
11 456 3.64078 0.236815 13.3
12 494 3.63925 0.203176 9.54
13 532 3.63819 0.186138 7.32
14 570 3.63747 0.165213 5.52
15 608 3.63697 0.148463 4.2
16 646 3.63663 0.132661 3.17
17 684 3.6364 0.118115 2.35
18 722 3.63624 0.102959 1.73
19 760 3.63616 0.0842739 1.2
20 798 3.63612 0.0589477 0.731
21 836 3.63611 0.0309845 0.391
22 874 3.6361 0.0119255 0.192
这两个配件:“lsqnonlin停止,因为平方和相对于其初始值的最终变化小于函数公差的默认值。”
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
在不查看resnorm的情况下,如何解释拟合结果的显示
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
从我所看到的,第一个配件“标准步骤”要少得多。f(x)和一阶最优性的最终结果是相似的
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
每列是什么意思?我该如何解释它们呢?:
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
迭代
-迭代编号
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
Func Count
-函数求值的数量
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
f(x)
-函数在x处的值
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
步长标准
-当前步长的大小
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
一阶最优性
-一阶最优性是衡量x点与最佳点的接近程度
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165
您想看到的是一阶最优性->0(以及残差->0),因为这将表明您的算法正在收敛或已经收敛到最优解。第一次拟合您必须提供更好的猜测或使用更好的算法,因为它仅在9次迭代中收敛,而第二次拟合在22次迭代中收敛。谢谢!你能通过显示器判断合身的质量吗?没问题!要查看拟合质量,您可以查看R^2或残差总和,以及其他指标。您还可以通过绘制数据和拟合图来定性查看。lsqnonlin输出R2还是我需要手动计算?只要快速查看一下文档,就可以知道您可能需要自己计算。
Norm of First-order
Iteration Func-count f(x) step optimality
0 24 17492.8 9.07e+05
1 48 143.52 0.106514 2.14e+04
2 72 28.1836 0.322225 9.21e+03
3 96 8.22318 0.190289 471
4 120 4.64683 0.106685 469
5 144 4.21385 0.110651 50.6
6 168 3.84595 0.132576 6.57
7 192 3.80318 0.0785982 0.574
8 216 3.80298 0.00714585 0.0696
9 240 3.80298 8.99227e-05 0.0165