skg.weibull_cdf_fit

skg.weibull_cdf_fit(x, y, sorted=True)[source]

Weibull CDF fit of the form F(t) = 1 - e^{-\left( \frac{t - \mu}{\beta} \right)^{\alpha}}.

This implementation is based on a transformation that makes the approximate solution to integral equation (22), presented in Régressions et équations intégrales applicable.

Parameters:
  • x (array-like) – The x-values of the data points, t in the equation. The fit will be performed on a raveled version of this array.
  • y (array-like) – The y-values of the data points corresponding to x, F(t) in the equation. Must be the same size as x. The fit will be performed on a raveled version of this array.
  • sorted (bool) – Set to True if y is already monotonically increasing or decreasing. If False, y will be sorted into increasing order, and x will be sorted along with it.
Returns:

alpha, beta, mu – A 3-element array of optimized fitting parameters. The first parameter is the shape, the second the scale, and the third the mean of the PDF.

Return type:

ndarray

Notes

The x- and y- data is conventionally transposed from what the final optimization expects. y is expected to be ascending or descending, not x.

References