Testing the pelicun.uq module

These are unit and integration tests on the uq module of pelicun.

pelicun.tests.test_uq.test_MVN_CDF_univariate()[source]

Test if the MVN CDF function provides accurate results for the special univariate case.

pelicun.tests.test_uq.test_MVN_CDF_multivariate()[source]

Test if the MVN CDF function provides accurate results for multivariate cases.

pelicun.tests.test_uq.test_RandomVariable_incorrect_none_defined()[source]

Test if the random variable object raises an error when the distribution is not empirical and no parameters are provided.

pelicun.tests.test_uq.test_RandomVariable_incorrect_multinomial_definition()[source]

Test if the random variable object raises an error when a multinomial distribution is defined with incorrect parameters, and test that it does not raise an error when the right parameters are provided.

pelicun.tests.test_uq.test_sampling_tr_alpha_error()[source]

Test if the function raises an error when the probability density that the truncation limits define is not sufficiently accurate for further use.

pelicun.tests.test_uq.test_sampling_non_truncated()[source]

Test if the sampling method returns appropriate samples for a non-truncated univariate and multivariate normal distribution.

pelicun.tests.test_uq.test_sampling_truncated_wide_limits()[source]

Test if the sampling method returns appropriate samples for a truncated univariate and multivariate normal distribution when the truncation limits are sufficiently wide to consider the result a normal distribution.

pelicun.tests.test_uq.test_sampling_truncated_narrow_limits()[source]

Test if the sampling method returns appropriate samples for a truncated univariate and multivariate normal distribution when the truncation limits are narrow.

pelicun.tests.test_uq.test_RandomVariable_sample_distribution_mixed_normal()[source]

Test if the distribution is sampled appropriately for a correlated mixture of normal and lognormal variables. Note that we already tested the sampling algorithm itself earlier, so we will not do a thorough verification of the samples, but rather check for errors in the inputs that would typically lead to significant mistakes in the results.

pelicun.tests.test_uq.test_RandomVariable_sample_distribution_multinomial()[source]

Test if the distribution is sampled appropriately for a multinomial variable. Also test that getting values for an individual RV that is part of a correlated RV_set works appropriately.”

pelicun.tests.test_uq.test_fitting_baseline()[source]

Test if the max. likelihood estimates of a (multivariate) normal distribution are sufficiently accurate in the baseline case with no truncation and no censoring.

pelicun.tests.test_uq.test_fitting_censored()[source]

Test if the max. likelihood estimates of a multivariate normal distribution are sufficiently accurate in cases with censored data.

pelicun.tests.test_uq.test_fitting_truncated()[source]

Test if the max. likelihood estimates of a multivariate normal distribution are sufficiently accurate in cases with truncation and uncensored data.

pelicun.tests.test_uq.test_fitting_truncated_and_censored()[source]

Test if the max. likelihood estimates of a multivariate normal distribution are sufficiently accurate in cases with truncation and censored data.

pelicun.tests.test_uq.test_fitting_lognormal()[source]

Test if the max. likelihood estimates of a multivariate lognormal distribution are sufficiently accurate