Gilles, Thanks for your reply! Concretely to the point, I want to implement SciPy curve_fit function using Java and Jython through Apache commons math library. Any idea of it?
Regards Yaqiang On Sat, Jul 30, 2022 at 11:17 PM Gilles Sadowski <[email protected]> wrote: > Hello. > > Le sam. 30 juil. 2022 à 10:58, Yaqiang Wang <[email protected]> a > écrit : > > > > I know implementing the ParametricUnivariateFunction > > < > https://commons.apache.org/proper/commons-math/apidocs/org/apache/commons/math4/analysis/ParametricUnivariateFunction.html > > > > interface > > and overriding value and gradient methods can fit the custom curve > > function. But the gradient array has to be calculated for each special > > function. > > I want to know is it possible to calculate gradient array without > > the information of the function formula, > > I don't follow; what kind of expression do you want to minimize? > A minimal example would be useful to understand what the issue is. > > > just like SciPy curve_fit function > > ( > > > https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html > )? > > I have tried it in the MeteoInfo project using getJacobianFunction which > > calculates gradient array using UnivariateDifferentiableFunction and > > DerivativeStructure. > > And Jython was used to mimic the curve_fit function ( > > > https://github.com/meteoinfo/MeteoInfo/blob/master/meteoinfo-lab/pylib/mipylib/numeric/optimize/minpack.py > ). > > > > > > But I can not get the same result as SciPy curve_fit function. I nee your > > help, Thanks! > > What you want to achieve is not clear to me. > > Sorry, > Gilles > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- ************************************************* Dr. Yaqiang Wang Chinese Academy of Meteorological Sciences (CAMS) 46, Zhong-Guan-Cun South Avenue Beijing, 100081 China [email protected] www.meteothink.org **************************************************
