Does Matlab perform optimization better than python?

92 ビュー (過去 30 日間)
Yeonsoo
Yeonsoo 2024 年 2 月 1 日
回答済み: the cyclist 2024 年 2 月 1 日
Hi, I am currently working on econometrics research and replicating all the matlab codes into python so that I can expand my research using machine learning stuff. But I found that matlab fminsearch() function works so much better than python's optimization packages such as scipy fmin or minimize. I compared two in the same setting (initial value, iteration, opt algorithm - ‘Nelder-Mead’, etc.), and while matlab's fminsearch successfully found the minimum point, scipy couldn't even though I increased the iteration and also implemented other algorithms.
Does this happen in general? Is matlab better than python when it comes to optimization?
  2 件のコメント
Torsten
Torsten 2024 年 2 月 1 日
Shouldn't it be an indication that MATLAB is a commercial product while python isn't ?
the cyclist
the cyclist 2024 年 2 月 1 日
While I am obviously a huge fan of MATLAB, I don't think you can infer that it is better simply because it is commercial. As a counterexample to that idea, I would point to R, which many many folks would say is vastly superior to either SAS or SPSS.

サインインしてコメントする。

回答 (1 件)

the cyclist
the cyclist 2024 年 2 月 1 日
Disclaimer: I barely qualify as a Python programmer.
I don't know of any benchmarking specifcally in optimization problems. I've seen a few comparisons among languages through the years (e.g. this one),
I think one challenge with a language like Python is being absolutely certain that you are using the most rigorous and well-tested packages available. It is not always the easiest one to find via google. Obviously scipy is a fantastic all-purpose package, but that doesn't make it the best for optimization problems.

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by