필터 지우기
필터 지우기

Does Matlab perform optimization better than python?

조회 수: 57 (최근 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 CenterFile Exchange에서 Introduction 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