CUQIpy 1.1.1.post0.dev88__tar.gz → 1.1.1.post0.dev104__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.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/CUQIpy.egg-info/PKG-INFO +1 -1
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/PKG-INFO +1 -1
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/_version.py +3 -3
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_cwmh.py +3 -1
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_gibbs.py +6 -2
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_hmc.py +4 -1
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_langevin_algorithm.py +11 -5
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_mh.py +3 -1
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/CUQIpy.egg-info/SOURCES.txt +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/CUQIpy.egg-info/dependency_links.txt +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/CUQIpy.egg-info/requires.txt +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/CUQIpy.egg-info/top_level.txt +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/LICENSE +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/README.md +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/_messages.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/array/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/array/_array.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/config.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/_data.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/astronaut.npz +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/camera.npz +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/cat.npz +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/cookie.png +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/data/satellite.mat +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/density/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/density/_density.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/diagnostics.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_beta.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_cauchy.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_cmrf.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_custom.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_distribution.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_gamma.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_gaussian.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_gmrf.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_inverse_gamma.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_joint_distribution.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_laplace.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_lmrf.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_lognormal.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_modifiedhalfnormal.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_normal.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_posterior.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_smoothed_laplace.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_uniform.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_conjugate.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_conjugate_approx.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_direct.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_laplace_approximation.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_pcn.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_rto.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_sampler.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_utilities.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/geometry/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/geometry/_geometry.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/implicitprior/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/implicitprior/_regularizedGMRF.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/implicitprior/_regularizedGaussian.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/implicitprior/_regularizedUnboundedUniform.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/likelihood/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/likelihood/_likelihood.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/model/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/model/_model.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/operator/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/operator/_operator.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/pde/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/pde/_pde.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/problem/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/problem/_problem.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_conjugate.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_conjugate_approx.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_cwmh.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_gibbs.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_hmc.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_langevin_algorithm.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_laplace_approximation.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_mh.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_pcn.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_rto.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_sampler.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/samples/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/samples/_samples.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/solver/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/solver/_solver.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/testproblem/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/testproblem/_testproblem.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/utilities/__init__.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/utilities/_get_python_variable_name.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/utilities/_utilities.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/pyproject.toml +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/requirements.txt +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/setup.cfg +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/setup.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_MRFs.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_abstract_distribution_density.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_bayesian_inversion.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_density.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_distribution.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_distributions_shape.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_geometry.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_implicit_priors.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_joint_distribution.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_likelihood.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_model.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_pde.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_posterior.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_problem.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_sampler.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_samples.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_solver.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_testproblem.py +0 -0
- {cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_utilities.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.1.1.post0.
|
|
3
|
+
Version: 1.1.1.post0.dev104
|
|
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.1.1.post0.
|
|
3
|
+
Version: 1.1.1.post0.dev104
|
|
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": "2024-09-
|
|
11
|
+
"date": "2024-09-13T10:02:02+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.1.1.post0.
|
|
14
|
+
"full-revisionid": "59ae0d0a693ec03a3282cffb9dc148e0729b3468",
|
|
15
|
+
"version": "1.1.1.post0.dev104"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -158,7 +158,9 @@ class CWMH(ProposalBasedSampler):
|
|
|
158
158
|
|
|
159
159
|
# accept/reject
|
|
160
160
|
u_theta = np.log(np.random.rand())
|
|
161
|
-
if (u_theta <= alpha)
|
|
161
|
+
if (u_theta <= alpha) and \
|
|
162
|
+
(not np.isnan(target_eval_star)) and \
|
|
163
|
+
(not np.isinf(target_eval_star)):
|
|
162
164
|
x_t[j] = x_all_components[j]
|
|
163
165
|
target_eval_t = target_eval_star
|
|
164
166
|
acc[j] = 1
|
|
@@ -66,7 +66,7 @@ class HybridGibbs:
|
|
|
66
66
|
import numpy as np
|
|
67
67
|
|
|
68
68
|
# Model and data
|
|
69
|
-
A, y_obs, probinfo = cuqi.testproblem.Deconvolution1D(phantom='
|
|
69
|
+
A, y_obs, probinfo = cuqi.testproblem.Deconvolution1D(phantom='sinc').get_components()
|
|
70
70
|
n = A.domain_dim
|
|
71
71
|
|
|
72
72
|
# Define distributions
|
|
@@ -90,7 +90,11 @@ class HybridGibbs:
|
|
|
90
90
|
sampler = cuqi.experimental.mcmc.HybridGibbs(posterior, sampling_strategy)
|
|
91
91
|
|
|
92
92
|
# Run sampler
|
|
93
|
-
|
|
93
|
+
sampler.warmup(200)
|
|
94
|
+
sampler.sample(1000)
|
|
95
|
+
|
|
96
|
+
# Get samples removing burn-in
|
|
97
|
+
samples = sampler.get_samples().burnthin(200)
|
|
94
98
|
|
|
95
99
|
# Plot results
|
|
96
100
|
samples['x'].plot_ci(exact=probinfo.exactSolution)
|
|
@@ -256,7 +256,10 @@ class NUTS(Sampler):
|
|
|
256
256
|
|
|
257
257
|
# Metropolis step
|
|
258
258
|
alpha2 = min(1, (n_prime/n)) #min(0, np.log(n_p) - np.log(n))
|
|
259
|
-
if (s_prime == 1) and
|
|
259
|
+
if (s_prime == 1) and \
|
|
260
|
+
(np.random.rand() <= alpha2) and \
|
|
261
|
+
(not np.isnan(logd_prime)) and \
|
|
262
|
+
(not np.isinf(logd_prime)):
|
|
260
263
|
self.current_point = point_prime
|
|
261
264
|
self.current_target_logd = logd_prime
|
|
262
265
|
self.current_target_grad = np.copy(grad_prime)
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_langevin_algorithm.py
RENAMED
|
@@ -102,10 +102,14 @@ class ULA(Sampler): # Refactor to Proposal-based sampler?
|
|
|
102
102
|
scalar
|
|
103
103
|
1 (accepted)
|
|
104
104
|
"""
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
acc = 0
|
|
106
|
+
if (not np.isnan(target_eval_star)) and \
|
|
107
|
+
(not np.isinf(target_eval_star)):
|
|
108
|
+
self.current_point = x_star
|
|
109
|
+
self.current_target_logd = target_eval_star
|
|
110
|
+
self.current_target_grad = target_grad_star
|
|
111
|
+
acc = 1
|
|
112
|
+
|
|
109
113
|
return acc
|
|
110
114
|
|
|
111
115
|
def step(self):
|
|
@@ -211,7 +215,9 @@ class MALA(ULA): # Refactor to Proposal-based sampler?
|
|
|
211
215
|
# accept/reject with Metropolis
|
|
212
216
|
acc = 0
|
|
213
217
|
log_u = np.log(np.random.rand())
|
|
214
|
-
if (log_u <= log_alpha) and
|
|
218
|
+
if (log_u <= log_alpha) and \
|
|
219
|
+
(not np.isnan(target_eval_star)) and \
|
|
220
|
+
(not np.isinf(target_eval_star)):
|
|
215
221
|
self.current_point = x_star
|
|
216
222
|
self.current_target_logd = target_eval_star
|
|
217
223
|
self.current_target_grad = target_grad_star
|
|
@@ -57,7 +57,9 @@ class MH(ProposalBasedSampler):
|
|
|
57
57
|
# accept/reject
|
|
58
58
|
u_theta = np.log(np.random.rand())
|
|
59
59
|
acc = 0
|
|
60
|
-
if (u_theta <= alpha)
|
|
60
|
+
if (u_theta <= alpha) and \
|
|
61
|
+
(not np.isnan(target_eval_star)) and \
|
|
62
|
+
(not np.isinf(target_eval_star)):
|
|
61
63
|
self.current_point = x_star
|
|
62
64
|
self.current_target_logd = target_eval_star
|
|
63
65
|
acc = 1
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_joint_distribution.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_modifiedhalfnormal.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/distribution/_smoothed_laplace.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/experimental/mcmc/_conjugate_approx.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/implicitprior/_regularizedGMRF.py
RENAMED
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/implicitprior/_regularizedGaussian.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/sampler/_laplace_approximation.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/cuqi/utilities/_get_python_variable_name.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.1.1.post0.dev88 → cuqipy-1.1.1.post0.dev104}/tests/test_abstract_distribution_density.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|