Linear fit
Given a number of datapoints (x,y), calculates
the parameters ‘m’ and ‘b’ that fit best (in the
least squares sense) the following model:
Datapoints may have weights assigned to them for both
x and y axes. The weight is the reciprocal of the variance.
The returned goodness of fit is the square root of chi^2.
Python interface
-
class iplt.alg.LinearFit((object)arg1)
-
AddDatapoint((LinearFit)arg1, (float)arg2, (float)arg3) → None :
- C++ signature :
- void AddDatapoint(iplt::alg::LinearFit {lvalue},double,double)
AddDatapoint( (LinearFit)arg1, (float)arg2, (float)arg3, (float)arg4) -> None :
- C++ signature :
- void AddDatapoint(iplt::alg::LinearFit {lvalue},double,double,double)
AddDatapoint( (LinearFit)arg1, (float)arg2, (float)arg3, (float)arg4, (float)arg5) -> None :
- C++ signature :
- void AddDatapoint(iplt::alg::LinearFit {lvalue},double,double,double,double)
-
Apply((LinearFit)arg1) → tuple :
- C++ signature :
- boost::python::tuple Apply(iplt::alg::LinearFit {lvalue})
-
Clear((LinearFit)arg1) → None :
- C++ signature :
- void Clear(iplt::alg::LinearFit {lvalue})
-
Estimate((LinearFit)arg1, (float)arg2) → tuple :
- C++ signature :
- boost::python::tuple Estimate(iplt::alg::LinearFit {lvalue},double)
-
ForceOrigin((LinearFit)arg1, (bool)arg2) → None :
- C++ signature :
- void ForceOrigin(iplt::alg::LinearFit {lvalue},bool)
-
GetGOF((LinearFit)arg1) → float :
- C++ signature :
- double GetGOF(iplt::alg::LinearFit {lvalue})
-
GetOffset((LinearFit)arg1) → float :
- C++ signature :
- double GetOffset(iplt::alg::LinearFit {lvalue})
-
GetOffsetVariance((LinearFit)arg1) → float :
- C++ signature :
- double GetOffsetVariance(iplt::alg::LinearFit {lvalue})
-
GetQ((LinearFit)arg1) → float :
- C++ signature :
- double GetQ(iplt::alg::LinearFit {lvalue})
-
GetRSQ((LinearFit)arg1) → float :
- C++ signature :
- double GetRSQ(iplt::alg::LinearFit {lvalue})
-
GetScale((LinearFit)arg1) → float :
- C++ signature :
- double GetScale(iplt::alg::LinearFit {lvalue})
-
GetScaleVariance((LinearFit)arg1) → float :
- C++ signature :
- double GetScaleVariance(iplt::alg::LinearFit {lvalue})
-
GetWGOF((LinearFit)arg1) → float :
- C++ signature :
- double GetWGOF(iplt::alg::LinearFit {lvalue})
-
PointCount((LinearFit)arg1) → int :
- C++ signature :
- int PointCount(iplt::alg::LinearFit {lvalue})
-
__init__((object)arg1) → None :
- C++ signature :
- void __init__(_object*)
C++ interface