Distributions#

Most distributions are wrapped around SciPy distribution objects. It is structured in a hierarchical way, where the parameters of a distribution can themselves have additional parameters. The likelihood of the parameterized distribution for a given dataset is optimized using SciPy’s minimize function. Pykelihood distributions share methods and arguments with SciPy distributions, though occasionally, some parameters have been adjusted (e.g., the GEV distribution) to align with statistical community standards.

Class

Distribution(*params)

Base class for all distributions.

Methods

cdf(x)

fit(data[, x0, score, scipy_args])

Fit the distribution to the data.

inverse_cdf(q)

isf(q)

logcdf(x)

logpdf(x)

logsf(x)

param_dict_to_vec(x)

param_mapping([only_opt])

Map parameters to their names.

pdf(x)

ppf(q)

rvs(size, *args, **kwargs)

sf(x)

with_params([params])

Create a new instance of the object with the given parameters.

Attributes

flattened_param_dict

Get a dictionary of flattened parameter names and their values.

flattened_params

Get a horizontal view of all parameters in the final state of their respective tree of dependence.

optimisation_param_dict

Get a dictionary of optimization parameter names and their values.

optimisation_params

Get all parameters used in the optimization.

param_dict

Get a dictionary of parameter names and their values.

params

Get parameters in their parametrized format, e.g. how they were defined.

params_names

Get the names of the parameters.