CUQIpy 1.4.0.post0.dev13__tar.gz → 1.4.0.post0.dev41__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.
Potentially problematic release.
This version of CUQIpy might be problematic. Click here for more details.
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/CUQIpy.egg-info/PKG-INFO +1 -1
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/CUQIpy.egg-info/SOURCES.txt +15 -14
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/PKG-INFO +1 -1
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/__init__.py +1 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/_version.py +3 -3
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/__init__.py +1 -2
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/_recommender.py +4 -4
- cuqipy-1.4.0.post0.dev41/cuqi/legacy/__init__.py +2 -0
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_cwmh.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_gibbs.py +9 -5
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_hmc.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_langevin_algorithm.py +3 -3
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_laplace_approximation.py +1 -1
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_mh.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_pcn.py +3 -3
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_rto.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_sampler.py +5 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/problem/_problem.py +87 -80
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/__init__.py +14 -13
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_conjugate.py +1 -1
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_conjugate_approx.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_cwmh.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_direct.py +1 -1
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_gibbs.py +5 -5
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_hmc.py +2 -2
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_langevin_algorithm.py +3 -3
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_laplace_approximation.py +1 -1
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_mh.py +1 -1
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_pcn.py +1 -1
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_rto.py +1 -1
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_bayesian_inversion.py +8 -8
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_implicit_priors.py +6 -6
- cuqipy-1.4.0.post0.dev13/tests/test_sampler.py → cuqipy-1.4.0.post0.dev41/tests/test_legacy_sampler.py +27 -27
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_problem.py +0 -1
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_samples.py +6 -6
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/CUQIpy.egg-info/dependency_links.txt +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/CUQIpy.egg-info/requires.txt +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/CUQIpy.egg-info/top_level.txt +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/LICENSE +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/README.md +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/_messages.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/array/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/array/_array.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/config.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/_data.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/astronaut.npz +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/camera.npz +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/cat.npz +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/cookie.png +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/data/satellite.mat +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/density/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/density/_density.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/diagnostics.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_beta.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_cauchy.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_cmrf.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_custom.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_distribution.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_gamma.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_gaussian.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_gmrf.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_inverse_gamma.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_joint_distribution.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_laplace.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_lmrf.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_lognormal.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_modifiedhalfnormal.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_normal.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_posterior.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_smoothed_laplace.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_truncated_normal.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/distribution/_uniform.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/algebra/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/algebra/_ast.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/algebra/_orderedset.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/algebra/_randomvariable.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/geometry/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/experimental/geometry/_productgeometry.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/geometry/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/geometry/_geometry.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/implicitprior/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/implicitprior/_regularizedGMRF.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/implicitprior/_regularizedGaussian.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/implicitprior/_regularizedUnboundedUniform.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/implicitprior/_restorator.py +0 -0
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_conjugate.py +0 -0
- {cuqipy-1.4.0.post0.dev13/cuqi → cuqipy-1.4.0.post0.dev41/cuqi/legacy}/sampler/_conjugate_approx.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/likelihood/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/likelihood/_likelihood.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/model/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/model/_model.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/operator/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/operator/_operator.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/pde/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/pde/_pde.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/problem/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13/cuqi/experimental/mcmc → cuqipy-1.4.0.post0.dev41/cuqi/sampler}/_sampler.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/samples/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/samples/_samples.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/solver/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/solver/_solver.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/testproblem/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/testproblem/_testproblem.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/utilities/__init__.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/utilities/_get_python_variable_name.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/cuqi/utilities/_utilities.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/pyproject.toml +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/requirements.txt +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/setup.cfg +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/setup.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_MRFs.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_abstract_distribution_density.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_density.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_distribution.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_distributions_shape.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_geometry.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_joint_distribution.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_likelihood.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_model.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_pde.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_posterior.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_solver.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_testproblem.py +0 -0
- {cuqipy-1.4.0.post0.dev13 → cuqipy-1.4.0.post0.dev41}/tests/test_utilities.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.4.0.post0.
|
|
3
|
+
Version: 1.4.0.post0.dev41
|
|
4
4
|
Summary: Computational Uncertainty Quantification for Inverse problems in Python
|
|
5
5
|
Maintainer-email: "Nicolai A. B. Riis" <nabr@dtu.dk>, "Jakob S. Jørgensen" <jakj@dtu.dk>, "Amal M. Alghamdi" <amaal@dtu.dk>, Chao Zhang <chaz@dtu.dk>
|
|
6
6
|
License: Apache License
|
|
@@ -52,19 +52,6 @@ cuqi/experimental/algebra/_orderedset.py
|
|
|
52
52
|
cuqi/experimental/algebra/_randomvariable.py
|
|
53
53
|
cuqi/experimental/geometry/__init__.py
|
|
54
54
|
cuqi/experimental/geometry/_productgeometry.py
|
|
55
|
-
cuqi/experimental/mcmc/__init__.py
|
|
56
|
-
cuqi/experimental/mcmc/_conjugate.py
|
|
57
|
-
cuqi/experimental/mcmc/_conjugate_approx.py
|
|
58
|
-
cuqi/experimental/mcmc/_cwmh.py
|
|
59
|
-
cuqi/experimental/mcmc/_direct.py
|
|
60
|
-
cuqi/experimental/mcmc/_gibbs.py
|
|
61
|
-
cuqi/experimental/mcmc/_hmc.py
|
|
62
|
-
cuqi/experimental/mcmc/_langevin_algorithm.py
|
|
63
|
-
cuqi/experimental/mcmc/_laplace_approximation.py
|
|
64
|
-
cuqi/experimental/mcmc/_mh.py
|
|
65
|
-
cuqi/experimental/mcmc/_pcn.py
|
|
66
|
-
cuqi/experimental/mcmc/_rto.py
|
|
67
|
-
cuqi/experimental/mcmc/_sampler.py
|
|
68
55
|
cuqi/geometry/__init__.py
|
|
69
56
|
cuqi/geometry/_geometry.py
|
|
70
57
|
cuqi/implicitprior/__init__.py
|
|
@@ -72,6 +59,19 @@ cuqi/implicitprior/_regularizedGMRF.py
|
|
|
72
59
|
cuqi/implicitprior/_regularizedGaussian.py
|
|
73
60
|
cuqi/implicitprior/_regularizedUnboundedUniform.py
|
|
74
61
|
cuqi/implicitprior/_restorator.py
|
|
62
|
+
cuqi/legacy/__init__.py
|
|
63
|
+
cuqi/legacy/sampler/__init__.py
|
|
64
|
+
cuqi/legacy/sampler/_conjugate.py
|
|
65
|
+
cuqi/legacy/sampler/_conjugate_approx.py
|
|
66
|
+
cuqi/legacy/sampler/_cwmh.py
|
|
67
|
+
cuqi/legacy/sampler/_gibbs.py
|
|
68
|
+
cuqi/legacy/sampler/_hmc.py
|
|
69
|
+
cuqi/legacy/sampler/_langevin_algorithm.py
|
|
70
|
+
cuqi/legacy/sampler/_laplace_approximation.py
|
|
71
|
+
cuqi/legacy/sampler/_mh.py
|
|
72
|
+
cuqi/legacy/sampler/_pcn.py
|
|
73
|
+
cuqi/legacy/sampler/_rto.py
|
|
74
|
+
cuqi/legacy/sampler/_sampler.py
|
|
75
75
|
cuqi/likelihood/__init__.py
|
|
76
76
|
cuqi/likelihood/_likelihood.py
|
|
77
77
|
cuqi/model/__init__.py
|
|
@@ -86,6 +86,7 @@ cuqi/sampler/__init__.py
|
|
|
86
86
|
cuqi/sampler/_conjugate.py
|
|
87
87
|
cuqi/sampler/_conjugate_approx.py
|
|
88
88
|
cuqi/sampler/_cwmh.py
|
|
89
|
+
cuqi/sampler/_direct.py
|
|
89
90
|
cuqi/sampler/_gibbs.py
|
|
90
91
|
cuqi/sampler/_hmc.py
|
|
91
92
|
cuqi/sampler/_langevin_algorithm.py
|
|
@@ -112,12 +113,12 @@ tests/test_distributions_shape.py
|
|
|
112
113
|
tests/test_geometry.py
|
|
113
114
|
tests/test_implicit_priors.py
|
|
114
115
|
tests/test_joint_distribution.py
|
|
116
|
+
tests/test_legacy_sampler.py
|
|
115
117
|
tests/test_likelihood.py
|
|
116
118
|
tests/test_model.py
|
|
117
119
|
tests/test_pde.py
|
|
118
120
|
tests/test_posterior.py
|
|
119
121
|
tests/test_problem.py
|
|
120
|
-
tests/test_sampler.py
|
|
121
122
|
tests/test_samples.py
|
|
122
123
|
tests/test_solver.py
|
|
123
124
|
tests/test_testproblem.py
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.4.0.post0.
|
|
3
|
+
Version: 1.4.0.post0.dev41
|
|
4
4
|
Summary: Computational Uncertainty Quantification for Inverse problems in Python
|
|
5
5
|
Maintainer-email: "Nicolai A. B. Riis" <nabr@dtu.dk>, "Jakob S. Jørgensen" <jakj@dtu.dk>, "Amal M. Alghamdi" <amaal@dtu.dk>, Chao Zhang <chaz@dtu.dk>
|
|
6
6
|
License: Apache License
|
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2025-10-
|
|
11
|
+
"date": "2025-10-09T13:25:50+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.4.0.post0.
|
|
14
|
+
"full-revisionid": "92bb2e16f3828d8074c008d4ed6a08edcae0889d",
|
|
15
|
+
"version": "1.4.0.post0.dev41"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -3,7 +3,7 @@ import inspect
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
|
|
5
5
|
# This import makes suggest_sampler easier to read
|
|
6
|
-
import cuqi.
|
|
6
|
+
import cuqi.sampler as samplers
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class SamplerRecommender(object):
|
|
@@ -15,7 +15,7 @@ class SamplerRecommender(object):
|
|
|
15
15
|
target: Density or JointDistribution
|
|
16
16
|
Distribution to get sampler recommendations for.
|
|
17
17
|
|
|
18
|
-
exceptions: list[cuqi.
|
|
18
|
+
exceptions: list[cuqi.sampler.Sampler], *optional*
|
|
19
19
|
Samplers not to be recommended.
|
|
20
20
|
|
|
21
21
|
Example
|
|
@@ -104,7 +104,7 @@ class SamplerRecommender(object):
|
|
|
104
104
|
|
|
105
105
|
"""
|
|
106
106
|
|
|
107
|
-
all_samplers = [(name, cls) for name, cls in inspect.getmembers(cuqi.
|
|
107
|
+
all_samplers = [(name, cls) for name, cls in inspect.getmembers(cuqi.sampler, inspect.isclass) if issubclass(cls, cuqi.sampler.Sampler)]
|
|
108
108
|
valid_samplers = []
|
|
109
109
|
|
|
110
110
|
for name, sampler in all_samplers:
|
|
@@ -116,7 +116,7 @@ class SamplerRecommender(object):
|
|
|
116
116
|
|
|
117
117
|
# Need a separate case for HybridGibbs
|
|
118
118
|
if self.valid_HybridGibbs_sampling_strategy() is not None:
|
|
119
|
-
valid_samplers += [cuqi.
|
|
119
|
+
valid_samplers += [cuqi.sampler.HybridGibbs.__name__ if as_string else cuqi.sampler.HybridGibbs]
|
|
120
120
|
|
|
121
121
|
return valid_samplers
|
|
122
122
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import cuqi
|
|
3
|
-
from cuqi.sampler import ProposalBasedSampler
|
|
3
|
+
from cuqi.legacy.sampler import ProposalBasedSampler
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class CWMH(ProposalBasedSampler):
|
|
@@ -48,7 +48,7 @@ class CWMH(ProposalBasedSampler):
|
|
|
48
48
|
target = cuqi.distribution.UserDefinedDistribution(dim=dim, logpdf_func=logpdf_func)
|
|
49
49
|
|
|
50
50
|
# Set up sampler
|
|
51
|
-
sampler = cuqi.sampler.CWMH(target, scale=1)
|
|
51
|
+
sampler = cuqi.legacy.sampler.CWMH(target, scale=1)
|
|
52
52
|
|
|
53
53
|
# Sample
|
|
54
54
|
samples = sampler.sample(2000)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
from cuqi.distribution import JointDistribution
|
|
2
|
-
from cuqi.sampler import Sampler
|
|
2
|
+
from cuqi.legacy.sampler import Sampler
|
|
3
3
|
from cuqi.samples import Samples
|
|
4
4
|
from typing import Dict, Union
|
|
5
5
|
import numpy as np
|
|
6
6
|
import sys
|
|
7
|
-
|
|
7
|
+
import warnings
|
|
8
8
|
|
|
9
9
|
class Gibbs:
|
|
10
10
|
"""
|
|
@@ -52,12 +52,12 @@ class Gibbs:
|
|
|
52
52
|
|
|
53
53
|
# Define sampling strategy
|
|
54
54
|
sampling_strategy = {
|
|
55
|
-
'x': cuqi.sampler.LinearRTO,
|
|
56
|
-
('d', 'l'): cuqi.sampler.Conjugate,
|
|
55
|
+
'x': cuqi.legacy.sampler.LinearRTO,
|
|
56
|
+
('d', 'l'): cuqi.legacy.sampler.Conjugate,
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
# Define Gibbs sampler
|
|
60
|
-
sampler = cuqi.sampler.Gibbs(posterior, sampling_strategy)
|
|
60
|
+
sampler = cuqi.legacy.sampler.Gibbs(posterior, sampling_strategy)
|
|
61
61
|
|
|
62
62
|
# Run sampler
|
|
63
63
|
samples = sampler.sample(Ns=1000, Nb=200)
|
|
@@ -71,6 +71,10 @@ class Gibbs:
|
|
|
71
71
|
|
|
72
72
|
def __init__(self, target: JointDistribution, sampling_strategy: Dict[Union[str,tuple], Sampler]):
|
|
73
73
|
|
|
74
|
+
warnings.warn(f"\nYou are using the legacy sampler '{self.__class__.__name__}'.\n"
|
|
75
|
+
f"This will be removed in a future release of CUQIpy.\n"
|
|
76
|
+
f"Please consider using the new samplers in the 'cuqi.sampler' module.\n", UserWarning, stacklevel=2)
|
|
77
|
+
|
|
74
78
|
# Store target and allow conditioning to reduce to a single density
|
|
75
79
|
self.target = target() # Create a copy of target distribution (to avoid modifying the original)
|
|
76
80
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import numpy as np
|
|
2
|
-
from cuqi.sampler import Sampler
|
|
2
|
+
from cuqi.legacy.sampler import Sampler
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
# another implementation is in https://github.com/mfouesneau/NUTS
|
|
@@ -50,7 +50,7 @@ class NUTS(Sampler):
|
|
|
50
50
|
target = tp.posterior
|
|
51
51
|
|
|
52
52
|
# Set up sampler
|
|
53
|
-
sampler = cuqi.sampler.NUTS(target)
|
|
53
|
+
sampler = cuqi.legacy.sampler.NUTS(target)
|
|
54
54
|
|
|
55
55
|
# Sample
|
|
56
56
|
samples = sampler.sample(10000, 5000)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import cuqi
|
|
3
|
-
from cuqi.sampler import Sampler
|
|
3
|
+
from cuqi.legacy.sampler import Sampler
|
|
4
4
|
|
|
5
5
|
class ULA(Sampler):
|
|
6
6
|
"""Unadjusted Langevin algorithm (ULA) (Roberts and Tweedie, 1996)
|
|
@@ -55,7 +55,7 @@ class ULA(Sampler):
|
|
|
55
55
|
gradient_func=gradient_func)
|
|
56
56
|
|
|
57
57
|
# Set up sampler
|
|
58
|
-
sampler = cuqi.sampler.ULA(target, scale=1/dim**2)
|
|
58
|
+
sampler = cuqi.legacy.sampler.ULA(target, scale=1/dim**2)
|
|
59
59
|
|
|
60
60
|
# Sample
|
|
61
61
|
samples = sampler.sample(2000)
|
|
@@ -162,7 +162,7 @@ class MALA(ULA):
|
|
|
162
162
|
gradient_func=gradient_func)
|
|
163
163
|
|
|
164
164
|
# Set up sampler
|
|
165
|
-
sampler = cuqi.sampler.MALA(target, scale=1/5**2)
|
|
165
|
+
sampler = cuqi.legacy.sampler.MALA(target, scale=1/5**2)
|
|
166
166
|
|
|
167
167
|
# Sample
|
|
168
168
|
samples = sampler.sample(2000)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import cuqi
|
|
3
|
-
from cuqi.sampler import ProposalBasedSampler
|
|
3
|
+
from cuqi.legacy.sampler import ProposalBasedSampler
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class MH(ProposalBasedSampler):
|
|
@@ -48,7 +48,7 @@ class MH(ProposalBasedSampler):
|
|
|
48
48
|
target = cuqi.distribution.UserDefinedDistribution(dim=dim, logpdf_func=logpdf_func)
|
|
49
49
|
|
|
50
50
|
# Set up sampler
|
|
51
|
-
sampler = cuqi.sampler.MH(target, scale=1)
|
|
51
|
+
sampler = cuqi.legacy.sampler.MH(target, scale=1)
|
|
52
52
|
|
|
53
53
|
# Sample
|
|
54
54
|
samples = sampler.sample(2000)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import numpy as np
|
|
2
2
|
import cuqi
|
|
3
|
-
from cuqi.sampler import Sampler
|
|
3
|
+
from cuqi.legacy.sampler import Sampler
|
|
4
4
|
|
|
5
5
|
class pCN(Sampler):
|
|
6
6
|
#Samples target*proposal
|
|
@@ -48,7 +48,7 @@ class pCN(Sampler):
|
|
|
48
48
|
prior = cuqi.distribution.UserDefinedDistribution(dim=dim, sample_func=sample_func)
|
|
49
49
|
|
|
50
50
|
# Set up sampler
|
|
51
|
-
sampler = cuqi.sampler.pCN((likelihood,prior), scale = 0.1)
|
|
51
|
+
sampler = cuqi.legacy.sampler.pCN((likelihood,prior), scale = 0.1)
|
|
52
52
|
|
|
53
53
|
# Sample
|
|
54
54
|
samples = sampler.sample(5000)
|
|
@@ -73,7 +73,7 @@ class pCN(Sampler):
|
|
|
73
73
|
target = cuqi.distribution.Posterior(likelihood, prior)
|
|
74
74
|
|
|
75
75
|
# Set up sampler
|
|
76
|
-
sampler = cuqi.sampler.pCN(target, scale = 0.1)
|
|
76
|
+
sampler = cuqi.legacy.sampler.pCN(target, scale = 0.1)
|
|
77
77
|
|
|
78
78
|
# Sample
|
|
79
79
|
samples = sampler.sample(5000)
|
|
@@ -4,7 +4,7 @@ from scipy.sparse.linalg import LinearOperator as scipyLinearOperator
|
|
|
4
4
|
import numpy as np
|
|
5
5
|
import cuqi
|
|
6
6
|
from cuqi.solver import CGLS, FISTA
|
|
7
|
-
from cuqi.sampler import Sampler
|
|
7
|
+
from cuqi.legacy.sampler import Sampler
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class LinearRTO(Sampler):
|
|
@@ -209,7 +209,7 @@ class RegularizedLinearRTO(LinearRTO):
|
|
|
209
209
|
Parameters
|
|
210
210
|
------------
|
|
211
211
|
target : `cuqi.distribution.Posterior`
|
|
212
|
-
See `cuqi.sampler.LinearRTO`
|
|
212
|
+
See `cuqi.legacy.sampler.LinearRTO`
|
|
213
213
|
|
|
214
214
|
x0 : `np.ndarray`
|
|
215
215
|
Initial point for the sampler. *Optional*.
|
|
@@ -3,11 +3,16 @@ import sys
|
|
|
3
3
|
import numpy as np
|
|
4
4
|
import cuqi
|
|
5
5
|
from cuqi.samples import Samples
|
|
6
|
+
import warnings
|
|
6
7
|
|
|
7
8
|
class Sampler(ABC):
|
|
8
9
|
|
|
9
10
|
def __init__(self, target, x0=None, dim=None, callback=None):
|
|
10
11
|
|
|
12
|
+
warnings.warn(f"\nYou are using the legacy sampler '{self.__class__.__name__}'.\n"
|
|
13
|
+
f"This will be removed in a future release of CUQIpy.\n"
|
|
14
|
+
f"Please consider using the new samplers in the 'cuqi.sampler' module.\n", UserWarning, stacklevel=2)
|
|
15
|
+
|
|
11
16
|
self._dim = dim
|
|
12
17
|
if hasattr(target,'dim'):
|
|
13
18
|
if self._dim is None:
|