[SciPy-User] curve_fit for f(x,y)?

elmar elmar@net4werling...
Wed Nov 24 11:44:41 CST 2010


Am 24.11.2010 17:57, schrieb josef.pktd@gmail.com:
> On Wed, Nov 24, 2010 at 11:46 AM, elmar<elmar@net4werling.de>  wrote:
>> Hi,
>>
>> is there a function in scipy similar to curve_fit for f(x,y) ? See
>> attachement.
>
> if you collect the x variables in a tuple (or put then in an array)
> then curvefit works without raising an exception
>
> def calc_WA((T, t), WA_0, k_0, E)
>
> and
> popt, pcov = curve_fit(calc_WA, (T_K, t_sec), WA) # get optimized parameters
> WA_predicted = calc_WA((T_K, t_sec), *popt)
>
> but predicted are zero, so maybe without good starting values it
> doesn't find a solution.
>
> I didn't try to read carefully, just tried out the tuple, and don't
> know if it makes sense.
>
> Josef
>
>>
>> Any help is wellcome
>> Cheers
>> Elmar
>>
>>
>> _______________________________________________
>> SciPy-User mailing list
>> SciPy-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-user
>>
>>
Hi Josef,

with your modification the script is working now. Unfortunatley my 
kinetic model is not the right one and need some modification.

Anyway, thanks for your held
Elmar

PS:  p0 = (6, 1e-5, 5000)



More information about the SciPy-User mailing list