fminconを用いた最適化プログラムの解析結果がPC種(CPU種)毎に異なります(同一verのMATLABにおける同一プログラム間の比較)。対策は有りますでしょうか?
2 views (last 30 days)
Show older comments
以下は、マシン3台の解析時の出力結果(コメント)です。同世代のCPUを有する②と③では同一の出力結果(解析結果も同一)が出るのですが、世代が少し新しめのCPUを有する①のみ異なる出力(解析)結果が出ます。
①TK-1(CPU=Core i7-3960X:2011年11月14日に日本販売)
Optimization stopped because the predicted change in the objective function,
9.971126e-07, is less than options.FunctionTolerance = 1.000000e-06, and the maximum constraint
violation, 2.352985e-07, is less than options.ConstraintTolerance = 1.000000e-06.
Optimization Metric Options
abs(steplength*directional derivative) = 9.97e-07 FunctionTolerance = 1e-06 (default)
max(constraint violation) = 2.35e-07 ConstraintTolerance = 1e-06 (default)
②TK-2(CPU=Core i7-870:2009年9月8日に日本販売)
Optimization stopped because the predicted change in the objective function,
1.079044e-07, is less than options.FunctionTolerance = 1.000000e-06, and the maximum constraint
violation, 3.012528e-07, is less than options.ConstraintTolerance = 1.000000e-06.
Optimization Metric Options
abs(steplength*directional derivative) = 1.08e-07 FunctionTolerance = 1e-06 (default)
max(constraint violation) = 3.01e-07 ConstraintTolerance = 1e-06 (default)
③HS-1(CPU=Core i7-975:2009年6月3日に日本販売)
Optimization stopped because the predicted change in the objective function,
1.079044e-07, is less than options.FunctionTolerance = 1.000000e-06, and the maximum constraint
violation, 3.012528e-07, is less than options.ConstraintTolerance = 1.000000e-06.
Optimization Metric Options
abs(steplength*directional derivative) = 1.08e-07 FunctionTolerance = 1e-06 (default)
max(constraint violation) = 3.01e-07 ConstraintTolerance = 1e-06 (default)
CPU依存(?)を起こさないようにする設定(刻み幅を一定にする?)等が有れば、お教え下さい。
0 Comments
Accepted Answer
michio
on 26 Jul 2017
CPU内部処理の違いに起因するものである場合は対策は難しそうです。
ただ、それぞれの結果をみるとすべてのケースで、反復間の目的関数の値の変化が FunctionTolerance (デフォルト設定 1e-6) 以下であることを理由に最適化処理が終了しているようですので、まずは FunctionTolerance を小さく設定してみるというのは手かもしれません。
また丸め誤差が原因で異なる局所解に収束してしまっている可能性はありますか? その場合は初期値を複数試してみるのも良いかと思います。
3 Comments
michio
on 26 Jul 2017
多くはありませんが、似た報告は頂いたことはあります。 異なる局所解に収束している可能性の方はいかがでしょうか?もしサンプルプログラムあれば、こちらでも再現を試みてみます。
More Answers (0)
See Also
Categories
Find more on ソルバーベースの非線形最適化 in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!