uadapy.distributions.chi_square_comb module

class uadapy.distributions.chi_square_comb.ChiSquareComb(mean: ndarray, cov: ndarray, pseudo_cov: ndarray)

Bases: object

The ChiSquareComb class provides a consistent interface to a combination of chi-square distribution.

Currently, we only support the distribution created by summing up two squares of complex normal distributions.

mu_complex

The complex mean of the distribution before squaring

Type:

np.ndarray

covariance

The complex covariance matrix of the distribution before squaring

Type:

np.ndarray

pseudo_covariance

The complex pseudo-covariance matrix of the distribution before squaring

Type:

np.ndarray

mu_real

The mean of the distribution where the first half corresponds to the real part and the second half to the imaginary part

Type:

np.ndarray

self.cov_real

The covariance matrix of the distribution where the first half corresponds to the real part and the second half to the imaginary part, it also contains the cross-correlation terms

Type:

np.ndarray

cov() ndarray

Returns the covariance matrix of the distribution.

Returns:

The covariance matrix of the distribution

Return type:

np.ndarray

mean() ndarray

Returns the mean of the distribution.

Returns:

The mean of the distribution

Return type:

np.ndarray

resample(size: int, seed: int = 0) ndarray

Resamples the distribution.

Parameters:
  • size (int) – The number of samples to be drawn

  • seed (int, optional) – The seed for the random number generator, default is 0

Returns:

The samples

Return type:

np.ndarray