uadapy package

Subpackages

Module contents

class uadapy.Distribution(model, name='', n_dims=1)

Bases: object

The Distribution class provides a consistent interface to a variety of distributions.

model

The underlying concrete distribution model, a scipy.stats distribution object or an array of samples

Type:

str

name

Name of the distribution type, e.g. ‘Normal’

Type:

str

n_dims

Dimensionality of the distribution

Type:

int

cov() ndarray | float

Covariance of the distribution.

Returns:

Covariance of the distribution.

Return type:

np.ndarray or float

kurt() ndarray | float

Kurtosis of the distribution.

Returns:

Kurtosis of the distribution.

Return type:

np.ndarray or float

mean() ndarray | float

Expected value of the distribution.

Returns:

Expected value of the distribution.

Return type:

np.ndarray or float

pdf(x: ndarray | float) ndarray | float

Computes the probability density function.

Parameters:

x (np.ndarray or float) – The position where the pdf should be evaluated.

Returns:

Samples of the distribution.

Return type:

np.ndarray or float

sample(n: int, seed: int | None = None) ndarray

Creates samples from the distribution.

Parameters:
  • n (int) – Number of samples.

  • seed (int, optional) – Seed for the random number generator for reproducibility, default is None.

Returns:

Samples of the distribution.

Return type:

np.ndarray

skew() ndarray | float

Skewness of the distribution.

Returns:

Skewness of the distribution.

Return type:

np.ndarray or float