Python API reference

Distributions

The general univariate distribution interface: 38 families with density, quantile, seeded random generation, and fitting.

Distribution A univariate distribution from the ported Numerics library.
distribution_names List the supported distribution families.

GEV convenience functions

Direct density, distribution, quantile, moments, and fitting functions for the Generalized Extreme Value distribution.

dgev GEV probability density at x.
pgev GEV cumulative distribution at q.
qgev GEV quantile (inverse CDF) at probability p.
gev_moments GEV distribution moments and support.
gev_fit Fit a GEV distribution to sample x.

Frequency analysis

The main flood-frequency analysis entry points.

univariate_analysis Bayesian univariate frequency analysis.
fit_distributions Fit and rank the 14 candidate distributions by maximum likelihood.
bulletin17c_analysis Bulletin 17C (log-Pearson Type III) flood-frequency analysis.
composite_analysis Composite frequency analysis over one child analysis per families entry.

Model-family analyses

mixture_analysis Bayesian mixture-model frequency analysis.
competing_risk_analysis Bayesian competing-risk frequency analysis.
point_process_analysis Bayesian point-process (peaks-over-threshold) frequency analysis.
spatial_gev_analysis Hierarchical spatial-GEV frequency analysis over gauged sites.
bivariate_analysis Bivariate (copula) joint-exceedance frequency analysis over two fixed marginals.
coincident_frequency_analysis Coincident-frequency analysis: a fitted bivariate copula + an M x N response surface.
rating_curve_analysis Stage-discharge rating-curve frequency analysis.

Time series

ar_analysis Bayesian autoregressive AR(p) time-series analysis.
ma_analysis Bayesian moving-average MA(q) time-series analysis.
arima_analysis Bayesian ARIMA(p,d,q) time-series analysis.
arimax_analysis Bayesian ARIMAX(p,d,q) time-series analysis with a deterministic trend.

MCMC

mcmc_sample Sample the posterior of a distribution’s parameters by MCMC.

Uncertainty and diagnostics

bootstrap_analysis Parametric bootstrap confidence bands for a fitted distribution.
estimation_diagnostics Bayesian estimation diagnostics (leverage / influence / prior influence).
prior_predictive_check Prior predictive check: sample from the model priors, simulate, summarize.
posterior_predictive_check Posterior predictive check: fit an MCMC, draw replicates, compute common p-values.

Statistics utilities

mgbt_test Multiple Grubbs-Beck low-outlier test.
box_cox_lambda Fit the Box-Cox transformation exponent by maximum likelihood.
box_cox Box-Cox power transformation of x with exponent lambda_.
box_cox_inverse Inverse Box-Cox transformation of x with exponent lambda_.
yeo_johnson_lambda Fit the Yeo-Johnson transformation exponent by maximum likelihood.
yeo_johnson Yeo-Johnson power transformation of x with exponent lambda_.
yeo_johnson_inverse Inverse Yeo-Johnson transformation of x with exponent lambda_.
plotting_positions Empirical plotting positions for a sample of size n.
latin_hypercube Latin hypercube sample of uniform [0, 1] probabilities.