skg.weibull_cdf

Weibull cumulative distribution fit with three parameters, of the form F(t) = 1 - e^{-\left( \frac{t - \mu}{\beta} \right)^{\alpha}}.

The data F_k must be positive. Unlike the other estimations, which are sorted according to their independent variable, this one expects the dependent variable to be sorted in ascending order.

Todo

Add proper handling of colinear inputs (and other singular matrix cases).

Todo

Add tests.

Todo

Add nan_policy argument.

Todo

Add PEP8 check to formal tests.

Todo

Add axis parameter.

Functions

model(x, alpha, beta, mu) Compute y = 1 - e^{-\left( \frac{x - \mu}{\beta} \right)^{\alpha}}.
weibull_cdf_fit(x, y[, sorted]) Weibull CDF fit of the form F(t) = 1 - e^{-\left( \frac{t - \mu}{\beta} \right)^{\alpha}}.
skg.weibull_cdf.model(x, alpha, beta, mu)[source]

Compute y = 1 - e^{-\left( \frac{x - \mu}{\beta} \right)^{\alpha}}.

Parameters:
  • x (array-like) – The value of the model will be the same shape as the input.
  • alpha (float) – The shape of the distribution.
  • beta (float) – The scale of the distribution.
  • mu (float) – The mean of the distribution.
Returns:

y – An array of the same shape as x, containing the model computed for the given parameters.

Return type:

array-like

skg.weibull_cdf.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