


Hi,
I have x and y variables data arrays. These two variables are assumed to berelated as y = A * exp(x/B). Now, I wanted to use LevenbergMarquardt nonlinear leastsquares fitting to find A and B for the best fit of the data.. Can anyone suggest me how I can proceed with the same. My intention is toobtain A and B for best fit. Look forward to your suggestions and sample code as an example. Thanks and regards, Madhavan 


> On Mar 28, 2019, at 7:54 AM, Madhavan Bomidi <blmadhavan> wrote:
> Hi, > I have x and y variables data arrays. These two variables are assumed to be related as y = A * exp(x/B). Now, I wanted to use LevenbergMarquardt nonlinear leastsquares fitting to find A and B for the best fit of the data. Can anyone suggest me how I can proceed with the same. My intention is to obtain A and B for best fit. Have you looked at the nonlinear leastsquares solutions in scicpy? Specifically, a system I’ve had to solve several times in the past uses it and it works quite well. from scipy.optimize import curve_fit def func2fit(x,a,b,c): return a  b * np.exp(c * x) Bill [..] 


Hi Bill,
Thanks for your suggestion. Where am I actually using the curve_fit in the defined function func2fit? Don't I need to initial assumption of a, b and c values so that optimized convergence occur with iteration of the function for the input data of x? Look forward to your suggestions, Madhavan 