Azzera filtri
Azzera filtri

Does Matlab perform optimization better than python?

57 visualizzazioni (ultimi 30 giorni)
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 Commenti
Torsten
Torsten il 1 Feb 2024
Shouldn't it be an indication that MATLAB is a commercial product while python isn't ?
the cyclist
the cyclist il 1 Feb 2024
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.

Accedi per commentare.

Risposte (1)

the cyclist
the cyclist il 1 Feb 2024
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.

Categorie

Scopri di più su Introduction to Installation and Licensing in Help Center e File Exchange

Prodotti


Release

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by