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

josef.pktd at gmail.com josef.pktd at gmail.com
Wed Nov 24 11:57:18 EST 2010


On Wed, Nov 24, 2010 at 11:46 AM, elmar <elmar at 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 at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
>



More information about the SciPy-User mailing list