simpm.dist

Probability distributions and fitting helpers used throughout SimPM.

The functions in this module wrap common SciPy distributions with a lightweight API tailored for simulation modeling. They make it easy to sample, plot, and fit distributions while keeping consistent return types for downstream components.

Functions

fit(data, dist_type[, method])

Fit a distribution on data and return a structured result.

fit_beta(data[, method])

Fit a beta distribution to the provided data.

fit_expon(data[, method])

Fit an exponential distribution with location fixed at zero.

fit_norm(data[, method])

Fit a normal distribution to the provided data.

fit_trapz(data[, method])

Fit a trapezoidal distribution to the provided data.

fit_triang(data[, method])

Fit a triangular distribution to the provided data.

make_beta(a, b, minp, maxp)

Create a beta distribution with validation.

make_expon(mean)

Create an exponential distribution with validation.

make_norm(mean, std)

Create a normal distribution with validation.

make_trapz(a, b, c, d)

Create a trapezoidal distribution with validation.

make_triang(a, b, c)

Create a triangular distribution with validation.

make_uniform(a, b)

Create a uniform distribution with validation.

Classes

FitResult(dist_type, params, scipy_dist, ks)

Container for the results of fitting a distribution.

beta(a, b, minp, maxp)

Defines a beta distribution.

distribution()

Lightweight wrapper around SciPy distributions.

empirical(data)

Defines an empirical distribution based on observed data.

expon(mean)

Defines an exponential distribution.

norm(mean, std)

Defines a normal distribution.

trapz(a, b, c, d)

Defines a trapezoidal distribution.

triang(a, b, c)

Defines a triangular distribution.

uniform(a, b)

Uniform distribution defined by lower/upper bounds.