PyVBMC 1.0.1__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyvbmc-1.0.3/CITATION.cff +55 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/PKG-INFO +38 -14
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/PyVBMC.egg-info/PKG-INFO +38 -14
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/PyVBMC.egg-info/SOURCES.txt +1 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/PyVBMC.egg-info/requires.txt +2 -2
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/README.md +16 -12
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyproject.toml +5 -8
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/abstract_acq_fcn.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/function_logger/function_logger.py +3 -3
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/parameter_transformer/parameter_transformer.py +36 -20
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/prior.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/spline_trapezoidal.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/trapezoidal.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/stats/get_hpd.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/stats/kde_1d.py +3 -3
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_product_prior.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_loop_termination.py +5 -5
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/variational_posterior/variational_posterior.py +8 -10
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/active_importance_sampling.py +1 -1
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/active_sample.py +3 -3
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/option_configs/advanced_vbmc_options.ini +2 -2
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/variational_optimization.py +18 -15
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/vbmc.py +27 -15
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.coveragerc +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.coveragerc-html.css +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.gitattributes +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.github/workflows/build.yml +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.github/workflows/docs.yml +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.github/workflows/merge-tests.yml +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.github/workflows/release.yml +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.github/workflows/tests.yml +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.gitignore +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/.pre-commit-config.yaml +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/LICENSE +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/MANIFEST.in +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/PyVBMC.egg-info/dependency_links.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/PyVBMC.egg-info/top_level.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/pyvbmc_example_1_basic_usage.ipynb +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/pyvbmc_example_2_inputs_outputs.ipynb +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/pyvbmc_example_3_diagnostics_and_saving.ipynb +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/pyvbmc_example_4_validation.ipynb +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/pyvbmc_example_5_prior_distributions.ipynb +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/pyvbmc_example_6_noisy_likelihoods.ipynb +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/Makefile +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/pyvbmc_example_1_full_code.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/pyvbmc_example_2_full_code.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/pyvbmc_example_3_full_code.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/pyvbmc_example_4_full_code.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/pyvbmc_example_5_full_code.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/examples/scripts/pyvbmc_example_6_full_code.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/logo.svg +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pylintrc +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/__main__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/acq_fcn.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/acq_fcn_imiqr.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/acq_fcn_log.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/acq_fcn_noisy.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/acq_fcn_vanilla.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/acq_fcn_viqr.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/acquisition_functions/utilities.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/decorators/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/decorators/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/decorators/handle_0D_1D_input.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/entropy/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/entropy/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/entropy/entlb_vbmc.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/entropy/entmc_vbmc.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/formatting/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/formatting/formatting.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/function_logger/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/function_logger/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/parameter_transformer/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/parameter_transformer/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/convert_to_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/product.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/scipy.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/smooth_box.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/tile_inputs.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/uniform_box.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/priors/user_function.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/stats/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/stats/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/stats/kl_div_mvn.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/_check_grad.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/_compare_matlab.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_abstract_acquisition_function.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_acq_fcn.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_acq_fcn_imiqr.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_acq_fcn_log.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_acq_fcn_noisy.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_acq_fcn_vanilla.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/acquisition_functions/test_acq_fcn_viqr.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/decorators/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/decorators/test_handle_0D_1D_input_decorator.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/entropy/entropy-test.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/entropy/test_entlb_vbmc.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/entropy/test_entmc_vbmc.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/function_logger/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/function_logger/test_function_logger.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/parameter_transformer/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/parameter_transformer/test_parameter_transformer.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_convert_to_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_priors.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_scipy_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_smooth_box_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_spline_trapezoid_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_tile_inputs.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_trapezoid_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_uniform_box_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/priors/test_user_function_prior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/stats/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/stats/test_get_hpd.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/stats/test_kde1d.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/stats/test_kldiv_mvn.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/testing/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/testing/test_check_grad.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/timer/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/timer/test_timer.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/X.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/bnd_lb.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/bnd_ub.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/mu.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/test_moments_no_orig_flag_2_MATLAB.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/test_variational_posterior.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/test_vp_save_and_load.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/test_vp_save_static.pkl +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/variational_posterior/vp-test.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/X.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/compare_MATLAB/activesample_proposalpdf.m +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/compare_MATLAB/activesample_proposalpdf.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/compare_MATLAB/fess.m +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/compare_MATLAB/fess.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/compare_MATLAB/log_isbasefun.m +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/compare_MATLAB/log_isbasefun.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/dF.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/dG_gp_log_joint.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/hyp.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/mu.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_active_importance_sampling.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_gaussian_process_train.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_iteration_history.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_minimize_adam.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_options.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_variational_optimization.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_active_sample.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_determine_best_vp.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_finalboost.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_init.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_optimize.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_save_and_load.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/test_vbmc_save_static.pkl +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/vbmc/y.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_rotoscaling.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_gp_X.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_gp_hyps.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_gp_hyps_new.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_gp_y.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_vp_K.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_vp_lambda.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_vp_mu.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_vp_sigma.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_gp_and_vp_vp_w.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_input_R_mat.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_input_rands.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/test_warp_input_scale.txt +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/testing/whitening/vp_initialized_MATLAB.mat +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/timer/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/timer/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/timer/timer.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/variational_posterior/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/variational_posterior/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/create_vbmc_animation.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/gaussian_process_train.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/iteration_history.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/minimize_adam.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/option_configs/basic_vbmc_options.ini +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/option_configs/test_options.ini +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/option_configs/test_options2.ini +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/vbmc/options.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/whitening/README.md +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/whitening/__init__.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/pyvbmc/whitening/whitening.py +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/setup.cfg +0 -0
- {PyVBMC-1.0.1 → pyvbmc-1.0.3}/setup.py +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
cff-version: "1.2.0"
|
|
2
|
+
authors:
|
|
3
|
+
- family-names: Huggins
|
|
4
|
+
given-names: Bobby
|
|
5
|
+
orcid: "https://orcid.org/0009-0006-3475-5964"
|
|
6
|
+
- family-names: Li
|
|
7
|
+
given-names: Chengkun
|
|
8
|
+
orcid: "https://orcid.org/0000-0001-5848-910X"
|
|
9
|
+
- family-names: Tobaben
|
|
10
|
+
given-names: Marlon
|
|
11
|
+
orcid: "https://orcid.org/0000-0002-9778-0853"
|
|
12
|
+
- family-names: Aarnos
|
|
13
|
+
given-names: Mikko J.
|
|
14
|
+
- family-names: Acerbi
|
|
15
|
+
given-names: Luigi
|
|
16
|
+
orcid: "https://orcid.org/0000-0001-7471-7336"
|
|
17
|
+
contact:
|
|
18
|
+
- family-names: Huggins
|
|
19
|
+
given-names: Bobby
|
|
20
|
+
orcid: "https://orcid.org/0009-0006-3475-5964"
|
|
21
|
+
- family-names: Acerbi
|
|
22
|
+
given-names: Luigi
|
|
23
|
+
orcid: "https://orcid.org/0000-0001-7471-7336"
|
|
24
|
+
doi: 10.5281/zenodo.7966315
|
|
25
|
+
message: If you use this software, please cite our article in the
|
|
26
|
+
Journal of Open Source Software.
|
|
27
|
+
preferred-citation:
|
|
28
|
+
authors:
|
|
29
|
+
- family-names: Huggins
|
|
30
|
+
given-names: Bobby
|
|
31
|
+
orcid: "https://orcid.org/0009-0006-3475-5964"
|
|
32
|
+
- family-names: Li
|
|
33
|
+
given-names: Chengkun
|
|
34
|
+
orcid: "https://orcid.org/0000-0001-5848-910X"
|
|
35
|
+
- family-names: Tobaben
|
|
36
|
+
given-names: Marlon
|
|
37
|
+
orcid: "https://orcid.org/0000-0002-9778-0853"
|
|
38
|
+
- family-names: Aarnos
|
|
39
|
+
given-names: Mikko J.
|
|
40
|
+
- family-names: Acerbi
|
|
41
|
+
given-names: Luigi
|
|
42
|
+
orcid: "https://orcid.org/0000-0001-7471-7336"
|
|
43
|
+
date-published: 2023-06-21
|
|
44
|
+
doi: 10.21105/joss.05428
|
|
45
|
+
issn: 2475-9066
|
|
46
|
+
issue: 86
|
|
47
|
+
journal: Journal of Open Source Software
|
|
48
|
+
publisher:
|
|
49
|
+
name: Open Journals
|
|
50
|
+
start: 5428
|
|
51
|
+
title: "PyVBMC: Efficient Bayesian inference in Python"
|
|
52
|
+
type: article
|
|
53
|
+
url: "https://joss.theoj.org/papers/10.21105/joss.05428"
|
|
54
|
+
volume: 8
|
|
55
|
+
title: "PyVBMC: Efficient Bayesian inference in Python"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyVBMC
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Variational Bayesian Monte Carlo in Python.
|
|
5
5
|
License: BSD 3-Clause License
|
|
6
6
|
|
|
@@ -34,8 +34,28 @@ License: BSD 3-Clause License
|
|
|
34
34
|
|
|
35
35
|
Requires-Python: >=3.9
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
37
|
-
Provides-Extra: dev
|
|
38
37
|
License-File: LICENSE
|
|
38
|
+
Requires-Dist: cma>=3.1.0
|
|
39
|
+
Requires-Dist: corner>=2.2.1
|
|
40
|
+
Requires-Dist: dill>=0.3.5.1
|
|
41
|
+
Requires-Dist: gpyreg>=0.1.0
|
|
42
|
+
Requires-Dist: imageio>=2.13.5
|
|
43
|
+
Requires-Dist: matplotlib>=3.9.0
|
|
44
|
+
Requires-Dist: numpy<2.0.0
|
|
45
|
+
Requires-Dist: plotly>=5.11.0
|
|
46
|
+
Requires-Dist: pytest>=6.2.5
|
|
47
|
+
Requires-Dist: pytest-mock>=3.6.1
|
|
48
|
+
Requires-Dist: pytest-rerunfailures>=10.2
|
|
49
|
+
Requires-Dist: scipy>=1.7.3
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: myst_nb>=0.13.1; extra == "dev"
|
|
52
|
+
Requires-Dist: numpydoc>=1.2.1; extra == "dev"
|
|
53
|
+
Requires-Dist: pylint>=2.15.5; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
55
|
+
Requires-Dist: sphinx>=4.3.2; extra == "dev"
|
|
56
|
+
Requires-Dist: sphinx-book-theme>=0.2.0; extra == "dev"
|
|
57
|
+
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
58
|
+
Requires-Dist: black>=21.12.0; extra == "dev"
|
|
39
59
|
|
|
40
60
|

|
|
41
61
|
|
|
@@ -54,7 +74,7 @@ PyVBMC is a Python implementation of the Variational Bayesian Monte Carlo (VBMC)
|
|
|
54
74
|
- an approximate posterior distribution of the model parameters;
|
|
55
75
|
- an approximation — technically, an approximate lower bound — of the log model evidence (also known as log marginal likelihood or log Bayes factor), a metric used for [Bayesian model selection](https://en.wikipedia.org/wiki/Bayes_factor).
|
|
56
76
|
|
|
57
|
-
Extensive benchmarks on both artificial test problems and a large number of real model-fitting problems from computational and cognitive neuroscience show that VBMC generally — and often vastly — outperforms alternative methods for sample-efficient Bayesian inference [[
|
|
77
|
+
Extensive benchmarks on both artificial test problems and a large number of real model-fitting problems from computational and cognitive neuroscience show that VBMC generally — and often vastly — outperforms alternative methods for sample-efficient Bayesian inference [[2,3](#references-and-citation)].
|
|
58
78
|
|
|
59
79
|
### Documentation
|
|
60
80
|
|
|
@@ -137,7 +157,7 @@ The `vp` object can be manipulated in various ways. For example, we can draw sam
|
|
|
137
157
|
The quick start example above works for deterministic (noiseless) evaluations of the target log-density. Py(VBMC) also supports *noisy* evaluations of the target.
|
|
138
158
|
Noisy evaluations often arise from simulation-based models, for which a direct expression of the (log) likelihood is not available.
|
|
139
159
|
|
|
140
|
-
For information on how to run PyVBMC on a noisy target, see [this example notebook](examples/
|
|
160
|
+
For information on how to run PyVBMC on a noisy target, see [this example notebook](examples/pyvbmc_example_6_noisy_likelihoods.ipynb) and the [VBMC FAQ](https://github.com/acerbilab/vbmc/wiki#noisy-target-function) (for MATLAB, but most concepts still apply).
|
|
141
161
|
|
|
142
162
|
## Next steps
|
|
143
163
|
|
|
@@ -161,7 +181,7 @@ In each iteration, PyVBMC uses *active sampling* to select which points to evalu
|
|
|
161
181
|
|
|
162
182
|
In the figure above, we show an example PyVBMC run on a [Rosenbrock "banana" function](https://en.wikipedia.org/wiki/Rosenbrock_function). The bottom-left panel shows PyVBMC at work: in grayscale are samples from the variational posterior (drawn as small points) and the corresponding estimated density (drawn as contours). The solid orange circles are the active sampling points chosen at each iteration, and the hollow blue circles are the previously sampled points. The topmost and rightnmost panels show histograms of the marginal densities along the $x_1$ and $x_2$ dimensions, respectively. PyVBMC converges to an excellent approximation of the true posterior with a few dozens evaluations of the target density.
|
|
163
183
|
|
|
164
|
-
See the VBMC papers [[1
|
|
184
|
+
See the VBMC papers [[1-3](#references-and-citation)] for more details.
|
|
165
185
|
|
|
166
186
|
## Troubleshooting and contact
|
|
167
187
|
|
|
@@ -174,7 +194,7 @@ If you have trouble doing something with PyVBMC, spot bugs or strange behavior,
|
|
|
174
194
|
|
|
175
195
|
## References and citation
|
|
176
196
|
|
|
177
|
-
1. Huggins, B., Li, C., Tobaben, M., Aarnos, M., & Acerbi, L. (2023).
|
|
197
|
+
1. Huggins, B., Li, C., Tobaben, M., Aarnos, M., & Acerbi, L. (2023). [PyVBMC: Efficient Bayesian inference in Python](https://joss.theoj.org/papers/10.21105/joss.05428). *Journal of Open Source Software* 8(86), 5428, https://doi.org/10.21105/joss.05428.
|
|
178
198
|
2. Acerbi, L. (2018). Variational Bayesian Monte Carlo. In *Advances in Neural Information Processing Systems 31*: 8222-8232. ([paper + supplement on arXiv](https://arxiv.org/abs/1810.05558), [NeurIPS Proceedings](https://papers.nips.cc/paper/8043-variational-bayesian-monte-carlo))
|
|
179
199
|
3. Acerbi, L. (2020). Variational Bayesian Monte Carlo with Noisy Likelihoods. In *Advances in Neural Information Processing Systems 33*: 8211-8222 ([paper + supplement on arXiv](https://arxiv.org/abs/2006.08655), [NeurIPS Proceedings](https://papers.nips.cc/paper/2020/hash/5d40954183d62a82257835477ccad3d2-Abstract.html)).
|
|
180
200
|
|
|
@@ -199,14 +219,18 @@ You may also want to check out [Bayesian Adaptive Direct Search in Python (PyBAD
|
|
|
199
219
|
|
|
200
220
|
```BibTeX
|
|
201
221
|
@article{huggins2023pyvbmc,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
222
|
+
title = {PyVBMC: Efficient Bayesian inference in Python},
|
|
223
|
+
author = {Bobby Huggins and Chengkun Li and Marlon Tobaben and Mikko J. Aarnos and Luigi Acerbi},
|
|
224
|
+
publisher = {The Open Journal},
|
|
225
|
+
journal = {Journal of Open Source Software},
|
|
226
|
+
url = {https://doi.org/10.21105/joss.05428},
|
|
227
|
+
doi = {10.21105/joss.05428},
|
|
228
|
+
year = {2023},
|
|
229
|
+
volume = {8},
|
|
230
|
+
number = {86},
|
|
231
|
+
pages = {5428}
|
|
232
|
+
}
|
|
233
|
+
|
|
210
234
|
@article{acerbi2018variational,
|
|
211
235
|
title={{V}ariational {B}ayesian {M}onte {C}arlo},
|
|
212
236
|
author={Acerbi, Luigi},
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: PyVBMC
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Variational Bayesian Monte Carlo in Python.
|
|
5
5
|
License: BSD 3-Clause License
|
|
6
6
|
|
|
@@ -34,8 +34,28 @@ License: BSD 3-Clause License
|
|
|
34
34
|
|
|
35
35
|
Requires-Python: >=3.9
|
|
36
36
|
Description-Content-Type: text/markdown
|
|
37
|
-
Provides-Extra: dev
|
|
38
37
|
License-File: LICENSE
|
|
38
|
+
Requires-Dist: cma>=3.1.0
|
|
39
|
+
Requires-Dist: corner>=2.2.1
|
|
40
|
+
Requires-Dist: dill>=0.3.5.1
|
|
41
|
+
Requires-Dist: gpyreg>=0.1.0
|
|
42
|
+
Requires-Dist: imageio>=2.13.5
|
|
43
|
+
Requires-Dist: matplotlib>=3.9.0
|
|
44
|
+
Requires-Dist: numpy<2.0.0
|
|
45
|
+
Requires-Dist: plotly>=5.11.0
|
|
46
|
+
Requires-Dist: pytest>=6.2.5
|
|
47
|
+
Requires-Dist: pytest-mock>=3.6.1
|
|
48
|
+
Requires-Dist: pytest-rerunfailures>=10.2
|
|
49
|
+
Requires-Dist: scipy>=1.7.3
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: myst_nb>=0.13.1; extra == "dev"
|
|
52
|
+
Requires-Dist: numpydoc>=1.2.1; extra == "dev"
|
|
53
|
+
Requires-Dist: pylint>=2.15.5; extra == "dev"
|
|
54
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
55
|
+
Requires-Dist: sphinx>=4.3.2; extra == "dev"
|
|
56
|
+
Requires-Dist: sphinx-book-theme>=0.2.0; extra == "dev"
|
|
57
|
+
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
58
|
+
Requires-Dist: black>=21.12.0; extra == "dev"
|
|
39
59
|
|
|
40
60
|

|
|
41
61
|
|
|
@@ -54,7 +74,7 @@ PyVBMC is a Python implementation of the Variational Bayesian Monte Carlo (VBMC)
|
|
|
54
74
|
- an approximate posterior distribution of the model parameters;
|
|
55
75
|
- an approximation — technically, an approximate lower bound — of the log model evidence (also known as log marginal likelihood or log Bayes factor), a metric used for [Bayesian model selection](https://en.wikipedia.org/wiki/Bayes_factor).
|
|
56
76
|
|
|
57
|
-
Extensive benchmarks on both artificial test problems and a large number of real model-fitting problems from computational and cognitive neuroscience show that VBMC generally — and often vastly — outperforms alternative methods for sample-efficient Bayesian inference [[
|
|
77
|
+
Extensive benchmarks on both artificial test problems and a large number of real model-fitting problems from computational and cognitive neuroscience show that VBMC generally — and often vastly — outperforms alternative methods for sample-efficient Bayesian inference [[2,3](#references-and-citation)].
|
|
58
78
|
|
|
59
79
|
### Documentation
|
|
60
80
|
|
|
@@ -137,7 +157,7 @@ The `vp` object can be manipulated in various ways. For example, we can draw sam
|
|
|
137
157
|
The quick start example above works for deterministic (noiseless) evaluations of the target log-density. Py(VBMC) also supports *noisy* evaluations of the target.
|
|
138
158
|
Noisy evaluations often arise from simulation-based models, for which a direct expression of the (log) likelihood is not available.
|
|
139
159
|
|
|
140
|
-
For information on how to run PyVBMC on a noisy target, see [this example notebook](examples/
|
|
160
|
+
For information on how to run PyVBMC on a noisy target, see [this example notebook](examples/pyvbmc_example_6_noisy_likelihoods.ipynb) and the [VBMC FAQ](https://github.com/acerbilab/vbmc/wiki#noisy-target-function) (for MATLAB, but most concepts still apply).
|
|
141
161
|
|
|
142
162
|
## Next steps
|
|
143
163
|
|
|
@@ -161,7 +181,7 @@ In each iteration, PyVBMC uses *active sampling* to select which points to evalu
|
|
|
161
181
|
|
|
162
182
|
In the figure above, we show an example PyVBMC run on a [Rosenbrock "banana" function](https://en.wikipedia.org/wiki/Rosenbrock_function). The bottom-left panel shows PyVBMC at work: in grayscale are samples from the variational posterior (drawn as small points) and the corresponding estimated density (drawn as contours). The solid orange circles are the active sampling points chosen at each iteration, and the hollow blue circles are the previously sampled points. The topmost and rightnmost panels show histograms of the marginal densities along the $x_1$ and $x_2$ dimensions, respectively. PyVBMC converges to an excellent approximation of the true posterior with a few dozens evaluations of the target density.
|
|
163
183
|
|
|
164
|
-
See the VBMC papers [[1
|
|
184
|
+
See the VBMC papers [[1-3](#references-and-citation)] for more details.
|
|
165
185
|
|
|
166
186
|
## Troubleshooting and contact
|
|
167
187
|
|
|
@@ -174,7 +194,7 @@ If you have trouble doing something with PyVBMC, spot bugs or strange behavior,
|
|
|
174
194
|
|
|
175
195
|
## References and citation
|
|
176
196
|
|
|
177
|
-
1. Huggins, B., Li, C., Tobaben, M., Aarnos, M., & Acerbi, L. (2023).
|
|
197
|
+
1. Huggins, B., Li, C., Tobaben, M., Aarnos, M., & Acerbi, L. (2023). [PyVBMC: Efficient Bayesian inference in Python](https://joss.theoj.org/papers/10.21105/joss.05428). *Journal of Open Source Software* 8(86), 5428, https://doi.org/10.21105/joss.05428.
|
|
178
198
|
2. Acerbi, L. (2018). Variational Bayesian Monte Carlo. In *Advances in Neural Information Processing Systems 31*: 8222-8232. ([paper + supplement on arXiv](https://arxiv.org/abs/1810.05558), [NeurIPS Proceedings](https://papers.nips.cc/paper/8043-variational-bayesian-monte-carlo))
|
|
179
199
|
3. Acerbi, L. (2020). Variational Bayesian Monte Carlo with Noisy Likelihoods. In *Advances in Neural Information Processing Systems 33*: 8211-8222 ([paper + supplement on arXiv](https://arxiv.org/abs/2006.08655), [NeurIPS Proceedings](https://papers.nips.cc/paper/2020/hash/5d40954183d62a82257835477ccad3d2-Abstract.html)).
|
|
180
200
|
|
|
@@ -199,14 +219,18 @@ You may also want to check out [Bayesian Adaptive Direct Search in Python (PyBAD
|
|
|
199
219
|
|
|
200
220
|
```BibTeX
|
|
201
221
|
@article{huggins2023pyvbmc,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
}
|
|
222
|
+
title = {PyVBMC: Efficient Bayesian inference in Python},
|
|
223
|
+
author = {Bobby Huggins and Chengkun Li and Marlon Tobaben and Mikko J. Aarnos and Luigi Acerbi},
|
|
224
|
+
publisher = {The Open Journal},
|
|
225
|
+
journal = {Journal of Open Source Software},
|
|
226
|
+
url = {https://doi.org/10.21105/joss.05428},
|
|
227
|
+
doi = {10.21105/joss.05428},
|
|
228
|
+
year = {2023},
|
|
229
|
+
volume = {8},
|
|
230
|
+
number = {86},
|
|
231
|
+
pages = {5428}
|
|
232
|
+
}
|
|
233
|
+
|
|
210
234
|
@article{acerbi2018variational,
|
|
211
235
|
title={{V}ariational {B}ayesian {M}onte {C}arlo},
|
|
212
236
|
author={Acerbi, Luigi},
|
|
@@ -15,7 +15,7 @@ PyVBMC is a Python implementation of the Variational Bayesian Monte Carlo (VBMC)
|
|
|
15
15
|
- an approximate posterior distribution of the model parameters;
|
|
16
16
|
- an approximation — technically, an approximate lower bound — of the log model evidence (also known as log marginal likelihood or log Bayes factor), a metric used for [Bayesian model selection](https://en.wikipedia.org/wiki/Bayes_factor).
|
|
17
17
|
|
|
18
|
-
Extensive benchmarks on both artificial test problems and a large number of real model-fitting problems from computational and cognitive neuroscience show that VBMC generally — and often vastly — outperforms alternative methods for sample-efficient Bayesian inference [[
|
|
18
|
+
Extensive benchmarks on both artificial test problems and a large number of real model-fitting problems from computational and cognitive neuroscience show that VBMC generally — and often vastly — outperforms alternative methods for sample-efficient Bayesian inference [[2,3](#references-and-citation)].
|
|
19
19
|
|
|
20
20
|
### Documentation
|
|
21
21
|
|
|
@@ -98,7 +98,7 @@ The `vp` object can be manipulated in various ways. For example, we can draw sam
|
|
|
98
98
|
The quick start example above works for deterministic (noiseless) evaluations of the target log-density. Py(VBMC) also supports *noisy* evaluations of the target.
|
|
99
99
|
Noisy evaluations often arise from simulation-based models, for which a direct expression of the (log) likelihood is not available.
|
|
100
100
|
|
|
101
|
-
For information on how to run PyVBMC on a noisy target, see [this example notebook](examples/
|
|
101
|
+
For information on how to run PyVBMC on a noisy target, see [this example notebook](examples/pyvbmc_example_6_noisy_likelihoods.ipynb) and the [VBMC FAQ](https://github.com/acerbilab/vbmc/wiki#noisy-target-function) (for MATLAB, but most concepts still apply).
|
|
102
102
|
|
|
103
103
|
## Next steps
|
|
104
104
|
|
|
@@ -122,7 +122,7 @@ In each iteration, PyVBMC uses *active sampling* to select which points to evalu
|
|
|
122
122
|
|
|
123
123
|
In the figure above, we show an example PyVBMC run on a [Rosenbrock "banana" function](https://en.wikipedia.org/wiki/Rosenbrock_function). The bottom-left panel shows PyVBMC at work: in grayscale are samples from the variational posterior (drawn as small points) and the corresponding estimated density (drawn as contours). The solid orange circles are the active sampling points chosen at each iteration, and the hollow blue circles are the previously sampled points. The topmost and rightnmost panels show histograms of the marginal densities along the $x_1$ and $x_2$ dimensions, respectively. PyVBMC converges to an excellent approximation of the true posterior with a few dozens evaluations of the target density.
|
|
124
124
|
|
|
125
|
-
See the VBMC papers [[1
|
|
125
|
+
See the VBMC papers [[1-3](#references-and-citation)] for more details.
|
|
126
126
|
|
|
127
127
|
## Troubleshooting and contact
|
|
128
128
|
|
|
@@ -135,7 +135,7 @@ If you have trouble doing something with PyVBMC, spot bugs or strange behavior,
|
|
|
135
135
|
|
|
136
136
|
## References and citation
|
|
137
137
|
|
|
138
|
-
1. Huggins, B., Li, C., Tobaben, M., Aarnos, M., & Acerbi, L. (2023).
|
|
138
|
+
1. Huggins, B., Li, C., Tobaben, M., Aarnos, M., & Acerbi, L. (2023). [PyVBMC: Efficient Bayesian inference in Python](https://joss.theoj.org/papers/10.21105/joss.05428). *Journal of Open Source Software* 8(86), 5428, https://doi.org/10.21105/joss.05428.
|
|
139
139
|
2. Acerbi, L. (2018). Variational Bayesian Monte Carlo. In *Advances in Neural Information Processing Systems 31*: 8222-8232. ([paper + supplement on arXiv](https://arxiv.org/abs/1810.05558), [NeurIPS Proceedings](https://papers.nips.cc/paper/8043-variational-bayesian-monte-carlo))
|
|
140
140
|
3. Acerbi, L. (2020). Variational Bayesian Monte Carlo with Noisy Likelihoods. In *Advances in Neural Information Processing Systems 33*: 8211-8222 ([paper + supplement on arXiv](https://arxiv.org/abs/2006.08655), [NeurIPS Proceedings](https://papers.nips.cc/paper/2020/hash/5d40954183d62a82257835477ccad3d2-Abstract.html)).
|
|
141
141
|
|
|
@@ -160,14 +160,18 @@ You may also want to check out [Bayesian Adaptive Direct Search in Python (PyBAD
|
|
|
160
160
|
|
|
161
161
|
```BibTeX
|
|
162
162
|
@article{huggins2023pyvbmc,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
}
|
|
163
|
+
title = {PyVBMC: Efficient Bayesian inference in Python},
|
|
164
|
+
author = {Bobby Huggins and Chengkun Li and Marlon Tobaben and Mikko J. Aarnos and Luigi Acerbi},
|
|
165
|
+
publisher = {The Open Journal},
|
|
166
|
+
journal = {Journal of Open Source Software},
|
|
167
|
+
url = {https://doi.org/10.21105/joss.05428},
|
|
168
|
+
doi = {10.21105/joss.05428},
|
|
169
|
+
year = {2023},
|
|
170
|
+
volume = {8},
|
|
171
|
+
number = {86},
|
|
172
|
+
pages = {5428}
|
|
173
|
+
}
|
|
174
|
+
|
|
171
175
|
@article{acerbi2018variational,
|
|
172
176
|
title={{V}ariational {B}ayesian {M}onte {C}arlo},
|
|
173
177
|
author={Acerbi, Luigi},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[project]
|
|
4
4
|
name = "PyVBMC"
|
|
5
|
-
dynamic = ["version"]
|
|
5
|
+
dynamic = ["version"] # use git tags for version, via setuptools_scm
|
|
6
6
|
description = "Variational Bayesian Monte Carlo in Python."
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
license = { file = "LICENSE" }
|
|
@@ -12,8 +12,8 @@ dependencies = [
|
|
|
12
12
|
"dill >= 0.3.5.1",
|
|
13
13
|
"gpyreg >= 0.1.0",
|
|
14
14
|
"imageio >= 2.13.5",
|
|
15
|
-
"matplotlib >= 3.
|
|
16
|
-
"numpy
|
|
15
|
+
"matplotlib >= 3.9.0",
|
|
16
|
+
"numpy < 2.0.0",
|
|
17
17
|
"plotly >= 5.11.0",
|
|
18
18
|
"pytest >= 6.2.5",
|
|
19
19
|
"pytest-mock >= 3.6.1",
|
|
@@ -26,7 +26,7 @@ requires-python = ">=3.9"
|
|
|
26
26
|
include-package-data = true
|
|
27
27
|
# Include examples in binary/wheel distribution:
|
|
28
28
|
packages = ["pyvbmc", "pyvbmc.examples"]
|
|
29
|
-
package-dir = {"pyvbmc.examples" = "examples"}
|
|
29
|
+
package-dir = { "pyvbmc.examples" = "examples" }
|
|
30
30
|
|
|
31
31
|
[tool.setuptools.package-data]
|
|
32
32
|
# Make sure to include example Notebooks:
|
|
@@ -45,10 +45,7 @@ dev = [
|
|
|
45
45
|
]
|
|
46
46
|
|
|
47
47
|
[build-system]
|
|
48
|
-
requires = [
|
|
49
|
-
"setuptools >= 45",
|
|
50
|
-
"setuptools_scm[toml] >= 6.2",
|
|
51
|
-
]
|
|
48
|
+
requires = ["setuptools >= 45", "setuptools_scm[toml] >= 6.2"]
|
|
52
49
|
build-backend = "setuptools.build_meta"
|
|
53
50
|
|
|
54
51
|
[tool.black]
|
|
@@ -135,7 +135,7 @@ class AbstractAcqFcn(ABC):
|
|
|
135
135
|
np.any(X_orig < optim_state.get("lb_eps_orig"), axis=1),
|
|
136
136
|
np.any(X_orig > optim_state.get("ub_eps_orig"), axis=1),
|
|
137
137
|
)
|
|
138
|
-
acq[idx_bounds] = np.
|
|
138
|
+
acq[idx_bounds] = np.inf
|
|
139
139
|
|
|
140
140
|
# Re-shape to 1-D, if necessary (to avoid errors in cma.fmin)
|
|
141
141
|
if acq.ndim > 1:
|
|
@@ -367,9 +367,9 @@ class FunctionLogger:
|
|
|
367
367
|
ValueError
|
|
368
368
|
Raise if there is more than one match for a duplicate entry.
|
|
369
369
|
"""
|
|
370
|
-
duplicate_flag = self.X == x
|
|
371
|
-
if np.any(duplicate_flag
|
|
372
|
-
if np.sum(duplicate_flag
|
|
370
|
+
duplicate_flag = (self.X == x).all(axis=1)
|
|
371
|
+
if np.any(duplicate_flag):
|
|
372
|
+
if np.sum(duplicate_flag) > 1:
|
|
373
373
|
raise ValueError("More than one match for duplicate entry.")
|
|
374
374
|
idx = np.argwhere(duplicate_flag)[0, 0]
|
|
375
375
|
N = self.n_evals[idx]
|
|
@@ -127,9 +127,9 @@ class ParameterTransformer:
|
|
|
127
127
|
|
|
128
128
|
# Center in transformed space
|
|
129
129
|
for i in range(D):
|
|
130
|
-
if np.isfinite(plb_tran[
|
|
131
|
-
self.mu[i] = 0.5 * (plb_tran[
|
|
132
|
-
self.delta[i] = pub_tran[
|
|
130
|
+
if np.isfinite(plb_tran[0, i]) and np.isfinite(pub_tran[0, i]):
|
|
131
|
+
self.mu[i] = 0.5 * (plb_tran[0, i] + pub_tran[0, i])
|
|
132
|
+
self.delta[i] = pub_tran[0, i] - plb_tran[0, i]
|
|
133
133
|
|
|
134
134
|
@handle_0D_1D_input(patched_kwargs=["x"], patched_argpos=[0])
|
|
135
135
|
def __call__(self, x: np.ndarray):
|
|
@@ -148,7 +148,7 @@ class ParameterTransformer:
|
|
|
148
148
|
u : np.ndarray
|
|
149
149
|
The variables transformed to unconstrained variables.
|
|
150
150
|
"""
|
|
151
|
-
|
|
151
|
+
x = x.astype(float)
|
|
152
152
|
u = np.copy(x)
|
|
153
153
|
|
|
154
154
|
# Unbounded scalars (possibly center and rescale)
|
|
@@ -160,7 +160,9 @@ class ParameterTransformer:
|
|
|
160
160
|
for t in self.bounded_types:
|
|
161
161
|
mask = self.type == t
|
|
162
162
|
if np.any(mask):
|
|
163
|
-
u[:, mask] = self._bounded_transforms[t]["direct"](
|
|
163
|
+
u[:, mask] = self._bounded_transforms[t]["direct"](
|
|
164
|
+
self, x, mask
|
|
165
|
+
)
|
|
164
166
|
|
|
165
167
|
# Rotoscale whitening:
|
|
166
168
|
# Rotate and rescale points in transformed space.
|
|
@@ -187,7 +189,7 @@ class ParameterTransformer:
|
|
|
187
189
|
x : np.ndarray
|
|
188
190
|
The original variables which result of the transformation.
|
|
189
191
|
"""
|
|
190
|
-
|
|
192
|
+
u = u.astype(float)
|
|
191
193
|
x = np.copy(u)
|
|
192
194
|
|
|
193
195
|
# Rotoscale whitening:
|
|
@@ -208,7 +210,9 @@ class ParameterTransformer:
|
|
|
208
210
|
for t in self.bounded_types:
|
|
209
211
|
mask = self.type == t
|
|
210
212
|
if np.any(mask):
|
|
211
|
-
xNew[:, mask] = self._bounded_transforms[t]["inverse"](
|
|
213
|
+
xNew[:, mask] = self._bounded_transforms[t]["inverse"](
|
|
214
|
+
self, x, mask
|
|
215
|
+
)
|
|
212
216
|
|
|
213
217
|
return xNew
|
|
214
218
|
|
|
@@ -232,6 +236,7 @@ class ParameterTransformer:
|
|
|
232
236
|
p : np.ndarray
|
|
233
237
|
The log absolute determinant of the Jacobian.
|
|
234
238
|
"""
|
|
239
|
+
u = u.astype(float)
|
|
235
240
|
u_c = np.copy(u)
|
|
236
241
|
|
|
237
242
|
# Rotoscale whitening:
|
|
@@ -252,7 +257,9 @@ class ParameterTransformer:
|
|
|
252
257
|
for t in self.bounded_types:
|
|
253
258
|
mask = self.type == t
|
|
254
259
|
if np.any(mask):
|
|
255
|
-
p[:, mask] = self._bounded_transforms[t]["jacobian"](
|
|
260
|
+
p[:, mask] = self._bounded_transforms[t]["jacobian"](
|
|
261
|
+
self, u_c, mask
|
|
262
|
+
)
|
|
256
263
|
|
|
257
264
|
# Whitening/rotoscaling density correction:
|
|
258
265
|
if self.scale is not None:
|
|
@@ -274,7 +281,7 @@ class ParameterTransformer:
|
|
|
274
281
|
if t == 3:
|
|
275
282
|
# logit
|
|
276
283
|
|
|
277
|
-
def bounded_transform(x, mask):
|
|
284
|
+
def bounded_transform(self, x, mask):
|
|
278
285
|
return _center(
|
|
279
286
|
_logit(
|
|
280
287
|
_to_unit_interval(
|
|
@@ -289,7 +296,7 @@ class ParameterTransformer:
|
|
|
289
296
|
|
|
290
297
|
self._bounded_transforms[t]["direct"] = bounded_transform
|
|
291
298
|
|
|
292
|
-
def bounded_inverse(u, mask):
|
|
299
|
+
def bounded_inverse(self, u, mask):
|
|
293
300
|
return _from_unit_interval(
|
|
294
301
|
_inverse_logit(
|
|
295
302
|
_uncenter(
|
|
@@ -302,7 +309,7 @@ class ParameterTransformer:
|
|
|
302
309
|
|
|
303
310
|
self._bounded_transforms[t]["inverse"] = bounded_inverse
|
|
304
311
|
|
|
305
|
-
def bounded_jacobian(u, mask):
|
|
312
|
+
def bounded_jacobian(self, u, mask):
|
|
306
313
|
j1 = np.log(self.ub_orig[:, mask] - self.lb_orig[:, mask])
|
|
307
314
|
y = _uncenter(u[:, mask], self.mu[mask], self.delta[mask])
|
|
308
315
|
z = -np.log1p(np.exp(-y))
|
|
@@ -315,7 +322,7 @@ class ParameterTransformer:
|
|
|
315
322
|
elif t == 12:
|
|
316
323
|
# probit: inverse normal CDF (probit) transform (default)
|
|
317
324
|
|
|
318
|
-
def bounded_transform(x, mask):
|
|
325
|
+
def bounded_transform(self, x, mask):
|
|
319
326
|
return _center(
|
|
320
327
|
_probit(
|
|
321
328
|
_to_unit_interval(
|
|
@@ -330,7 +337,7 @@ class ParameterTransformer:
|
|
|
330
337
|
|
|
331
338
|
self._bounded_transforms[t]["direct"] = bounded_transform
|
|
332
339
|
|
|
333
|
-
def bounded_inverse(u, mask):
|
|
340
|
+
def bounded_inverse(self, u, mask):
|
|
334
341
|
return _from_unit_interval(
|
|
335
342
|
_inverse_probit(
|
|
336
343
|
_uncenter(
|
|
@@ -343,7 +350,7 @@ class ParameterTransformer:
|
|
|
343
350
|
|
|
344
351
|
self._bounded_transforms[t]["inverse"] = bounded_inverse
|
|
345
352
|
|
|
346
|
-
def bounded_jacobian(u, mask):
|
|
353
|
+
def bounded_jacobian(self, u, mask):
|
|
347
354
|
j1 = np.log(self.ub_orig[:, mask] - self.lb_orig[:, mask])
|
|
348
355
|
y = _uncenter(u[:, mask], self.mu[mask], self.delta[mask])
|
|
349
356
|
j2 = -0.5 * np.log(2 * np.pi) - 0.5 * y**2
|
|
@@ -355,7 +362,7 @@ class ParameterTransformer:
|
|
|
355
362
|
elif t == 13:
|
|
356
363
|
# student4: Student's T with nu=4 CDF transform
|
|
357
364
|
|
|
358
|
-
def bounded_transform(x, mask):
|
|
365
|
+
def bounded_transform(self, x, mask):
|
|
359
366
|
return _center(
|
|
360
367
|
_student4(
|
|
361
368
|
_to_unit_interval(
|
|
@@ -370,7 +377,7 @@ class ParameterTransformer:
|
|
|
370
377
|
|
|
371
378
|
self._bounded_transforms[t]["direct"] = bounded_transform
|
|
372
379
|
|
|
373
|
-
def bounded_inverse(u, mask):
|
|
380
|
+
def bounded_inverse(self, u, mask):
|
|
374
381
|
return _from_unit_interval(
|
|
375
382
|
_inverse_student4(
|
|
376
383
|
_uncenter(
|
|
@@ -383,7 +390,7 @@ class ParameterTransformer:
|
|
|
383
390
|
|
|
384
391
|
self._bounded_transforms[t]["inverse"] = bounded_inverse
|
|
385
392
|
|
|
386
|
-
def bounded_jacobian(u, mask):
|
|
393
|
+
def bounded_jacobian(self, u, mask):
|
|
387
394
|
j1 = np.log(self.ub_orig[:, mask] - self.lb_orig[:, mask])
|
|
388
395
|
y = _uncenter(u[:, mask], self.mu[mask], self.delta[mask])
|
|
389
396
|
j2 = np.log(3 / 8) - (5 / 2) * np.log1p(y**2 / 4)
|
|
@@ -496,7 +503,7 @@ def _uncenter(v, mu, delta):
|
|
|
496
503
|
|
|
497
504
|
def _logit(z):
|
|
498
505
|
# prevent divide by zero
|
|
499
|
-
u = np.
|
|
506
|
+
u = np.zeros_like(z)
|
|
500
507
|
u[z == 0] = -np.inf
|
|
501
508
|
u[z == 1] = np.inf
|
|
502
509
|
|
|
@@ -505,7 +512,12 @@ def _logit(z):
|
|
|
505
512
|
|
|
506
513
|
|
|
507
514
|
def _inverse_logit(u):
|
|
508
|
-
|
|
515
|
+
# prevent overflow
|
|
516
|
+
z = np.zeros_like(u)
|
|
517
|
+
mask = -u > np.log(np.finfo(np.float64).max)
|
|
518
|
+
z[mask] = 0.0
|
|
519
|
+
z[~mask] = 1 / (1 + np.exp(-u[~mask]))
|
|
520
|
+
return z
|
|
509
521
|
|
|
510
522
|
|
|
511
523
|
def _probit(z):
|
|
@@ -518,7 +530,11 @@ def _inverse_probit(u):
|
|
|
518
530
|
|
|
519
531
|
def _student4(z):
|
|
520
532
|
aa = np.sqrt(4 * z * (1 - z))
|
|
521
|
-
|
|
533
|
+
# prevent divide by zero
|
|
534
|
+
mask = aa == 0.0
|
|
535
|
+
q = np.zeros_like(z)
|
|
536
|
+
q[mask] = np.inf
|
|
537
|
+
q[~mask] = np.cos(np.arccos(aa[~mask]) / 3) / aa[~mask]
|
|
522
538
|
return np.sign(z - 0.5) * (2 * np.sqrt(q - 1))
|
|
523
539
|
|
|
524
540
|
|
|
@@ -60,7 +60,7 @@ class Prior(ABC):
|
|
|
60
60
|
return np.exp(self.log_pdf(x, keepdims=keepdims))
|
|
61
61
|
|
|
62
62
|
def support(self):
|
|
63
|
-
"""Returns the support of the distribution.
|
|
63
|
+
r"""Returns the support of the distribution.
|
|
64
64
|
|
|
65
65
|
Used to test that the distribution integrates to one, so it is also
|
|
66
66
|
acceptable to return a box which bounds the support of the
|
|
@@ -7,7 +7,7 @@ from pyvbmc.priors import Prior, tile_inputs
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class SplineTrapezoidal(Prior):
|
|
10
|
-
"""Multivariate spline-trapezoidal prior.
|
|
10
|
+
r"""Multivariate spline-trapezoidal prior.
|
|
11
11
|
|
|
12
12
|
A prior distribution represented by a density with external bounds ``a``
|
|
13
13
|
and ``b`` and internal points ``u`` and ``v``. Each marginal distribution
|
|
@@ -7,7 +7,7 @@ from pyvbmc.priors import Prior, tile_inputs
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class Trapezoidal(Prior):
|
|
10
|
-
"""Multivariate trapezoidal prior.
|
|
10
|
+
r"""Multivariate trapezoidal prior.
|
|
11
11
|
|
|
12
12
|
A prior distribution represented by a density with external bounds ``a``
|
|
13
13
|
and ``b`` and internal points ``u`` and ``v``. Each marginal distribution
|
|
@@ -40,6 +40,6 @@ def get_hpd(X: np.ndarray, y: np.ndarray, hpd_frac: float = 0.8):
|
|
|
40
40
|
if hpd_N > 0:
|
|
41
41
|
hpd_range = np.max(hpd_X, axis=0) - np.min(hpd_X, axis=0)
|
|
42
42
|
else:
|
|
43
|
-
hpd_range = np.full((D), np.
|
|
43
|
+
hpd_range = np.full((D), np.nan)
|
|
44
44
|
|
|
45
45
|
return hpd_X, hpd_y, hpd_range, indices
|
|
@@ -42,8 +42,8 @@ def _fixed_point(
|
|
|
42
42
|
Note that the factor of 2.0 in the definition of f is correct. See longer
|
|
43
43
|
discussion here: https://github.com/tommyod/KDEpy/issues/95
|
|
44
44
|
"""
|
|
45
|
-
i_range_squared = np.
|
|
46
|
-
a2 = np.
|
|
45
|
+
i_range_squared = np.asarray(i_range_squared, dtype=np.float64)
|
|
46
|
+
a2 = np.asarray(a2, dtype=np.float64)
|
|
47
47
|
ell = 7
|
|
48
48
|
f = (
|
|
49
49
|
2.0
|
|
@@ -59,7 +59,7 @@ def _fixed_point(
|
|
|
59
59
|
return -1
|
|
60
60
|
|
|
61
61
|
for s in reversed(range(2, ell)):
|
|
62
|
-
odd_numbers_prod = np.
|
|
62
|
+
odd_numbers_prod = np.prod(
|
|
63
63
|
np.arange(1, 2 * s + 1, 2, dtype=np.float64)
|
|
64
64
|
)
|
|
65
65
|
K0 = odd_numbers_prod / np.sqrt(2.0 * np.pi)
|