fit_burr12_sf
- mdtools.functions.fit_burr12_sf(xdata, ydata, ysd=None, return_valid=False, **kwargs)[source]
Fit the survival function of the Burr Type XII distribution to ydata using
scipy.optimize.curve_fit()
.The survival function of the Burr Type XII distribution is given by
\[S(t) = \frac{ 1 }{ \left[ 1 + \left( \frac{t}{\tau} \right)^\beta \right]^\delta }\]For \(\beta = 1\), the Burr Type XII distribution becomes the Lomax distribution and for \(\delta = 1\) it becomes the log-logistic distribution. The survival function of the Lomax distribution is equal to the Becquerel decay law.
- Parameters:
xdata (
array_like
) – The independent variable where the data is measured.ydata (
array_like
) – The dependent data. Must have the same shape as xdata. Only data points with 0 < ydata <= 1 will be considered. NaN’s and infinite values will not be considered, either.ysd (
array_like
, optional) – The standard deviation of ydata. Must have the same shape as ydata.return_valid (
bool
, optional) – IfTrue
, return a boolean array of the same shape as ydata that indicates which elements of ydata meet the requirements given above.kwargs (
dict
, optional) – Additional keyword arguments (besides xdata, ydata and sigma) to parse toscipy.optimize.curve_fit()
. See there for possible options. By default, absolute_sigma is set toTrue
, p0 is set to[tau_init, 1, 1]
and bounds is set to([0, 0, 1], [np.inf, 1, 2])
.tau_init
is the point at which ydata falls below \(1/2\).
- Returns:
popt (
numpy.ndarray
) – Optimal values for the parameters so that the sum of the squared residuals is minimized. The first element of popt is the optimal \(\tau\) value, the second element is the optimal \(\beta\) value, the third value is the optimal \(\delta\) value.perr (
numpy.ndarray
) – Standard deviation of the optimal parameters.valid (
numpy.ndarray
) – Boolean array of the same shape as ydata indicating, which elements of ydata were used for the fit. Only returned if return_valid isTrue
.
See also
mdtools.functions.fit_burr12_sf_alt()
Fit the survival function of the Burr Type XII distribution using an alternative parameterization
mdtools.functions.burr12_sf()
Survival function of the Burr Type XII distribution function