Coverage for pybmc/__init__.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.10.0, created at 2026-07-20 21:03 +0000

1# This file makes the `pybmc` directory a package. 

2""" 

3pybmc: Bayesian Model Combination toolkit 

4 

5Classes: 

6- Model: A model defined by input/output data 

7- Dataset: Handles loading and preparing nuclear model datasets 

8- BayesianModelCombination: Combines models using Bayesian inference 

9 

10Error models (see `pybmc.error_models`): 

11- homoscedastic (constant variance) and six heteroscedastic variants 

12 whose variance depends on distance in principal-component space 

13 and/or the spread among model predictions. All of them share one 

14 likelihood and sampler; homoscedastic is the constant-only case. 

15 

16Randomness (see `pybmc.rng`): 

17- All samplers and posterior-predictive draws are driven by a single 

18 seeded package-wide generator (`DEFAULT_SEED`), so runs are 

19 reproducible end to end; use `set_seed` to re-seed mid-session. 

20""" 

21 

22from .data import Dataset 

23from .bmc import BayesianModelCombination 

24from .inference_utils import ( 

25 gibbs_sampler, 

26 gibbs_sampler_simplex, 

27 gibbs_sampler_heteroscedastic, 

28 USVt_hat_extraction, 

29) 

30from .sampling_utils import ( 

31 coverage, 

32 coverage_quality, 

33 diagnose_coverage_shape, 

34 mace, 

35 reduced_chi_square, 

36 DEFAULT_PREDICTIVE_SEED, 

37) 

38from .error_models import ( 

39 VARIANCE_MODELS, 

40 HeteroscedasticMetrics, 

41 required_metrics, 

42 variance_basis, 

43 variance_parameter_names, 

44) 

45from .rng import DEFAULT_SEED, get_rng, set_seed 

46 

47 

48__all__ = [ 

49 "Model", 

50 "Dataset", 

51 "BayesianModelCombination", 

52 "gibbs_sampler", 

53 "gibbs_sampler_simplex", 

54 "gibbs_sampler_heteroscedastic", 

55 "USVt_hat_extraction", 

56 "coverage", 

57 "coverage_quality", 

58 "diagnose_coverage_shape", 

59 "mace", 

60 "reduced_chi_square", 

61 "DEFAULT_PREDICTIVE_SEED", 

62 "DEFAULT_SEED", 

63 "get_rng", 

64 "set_seed", 

65 "VARIANCE_MODELS", 

66 "HeteroscedasticMetrics", 

67 "required_metrics", 

68 "variance_basis", 

69 "variance_parameter_names", 

70]