dubfi.tests.test_inversion_prior_pdf

Test implementation of different prior cost functions.

Added in version 0.1.5.

Functions

random_posdef(size, rng[, offset]) → numpy.ndarray

Generate random, positive definite matrix.

test_prior_pdf(rng, invertor, b_diag, kwargs[, size, ...])

Test that derivatives of prior cost function are correct.

test_prior_pdf_sparse_reconstruction(rng[, size, samples])

Test that Laplace and sparse reconstruction prior PDF agree.

Module Contents

dubfi.tests.test_inversion_prior_pdf.random_posdef(size: int, rng: numpy.random.Generator, offset: float = 1e-06) → numpy.ndarray

Generate random, positive definite matrix.

dubfi.tests.test_inversion_prior_pdf.test_prior_pdf(rng, invertor, b_diag, kwargs, size=20, samples=50)

Test that derivatives of prior cost function are correct.

dubfi.tests.test_inversion_prior_pdf.test_prior_pdf_sparse_reconstruction(rng, size=20, samples=50)

Test that Laplace and sparse reconstruction prior PDF agree.