[SciPy-User] fitting data
Thu Jul 30 00:49:35 CDT 2009
I thinkk he means that f0 and fb are two known function of x, and he is
interested in the weight parameter a.
You can try :
from scipy import optimize
def func(x,a): return a * fb(x) + (1-a) fo(x)
that is one of many options....
Chris Colbert wrote:
> maybe i don't understand what you are asking, but if (a) is your only
> unknown, just do:
> a = (f - f0) / (fb - f0)
> On Thu, Jul 30, 2009 at 1:32 AM, Bala
> subramanian<firstname.lastname@example.org> wrote:
>> I am new and just joined the scipy community. I want to fit (least sq. fit)
>> my data to the following equation. I would greatly appreciate if someone
>> could help me with a sample code on how fitting is done with scipy.
>> The function is : f = a * fb + (1-a) fo, where f, fb, fo are known.
>> SciPy-User mailing list
> SciPy-User mailing list
More information about the SciPy-User