I am trying to understand why the scipy.optimize.least_squares exists in scipy. This function can be used to perform model-fitting. However, one could use scipy.optimize.minimize to do the same thing. The only difference is that scipy.optimize.least_squares does the calculation of the chi-squared internally, while if one wants to use scipy.optimize.minimize, he/she will have to calculate the chi-squared manually inside the function the user want to minimize. Also, scipy.optimize.least_squares can not be considered a wrapper around scipy.optimize.minimize because the three methods it supports (trf, dogbox, lm), are not supported at all by scipy.optimize.minimize.
So my questions are:
- Why
scipy.optimize.least_squaresexists when the same result can be achieved withscipy.optimize.minimize? - Why
scipy.optimize.minimizedoes not support thetrf,dogbox, andlmmethods?
Thank you.