CUQIpy 1.1.1.post0.dev86__py3-none-any.whl → 1.1.1.post0.dev90__py3-none-any.whl
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.dev86.dist-info → CUQIpy-1.1.1.post0.dev90.dist-info}/METADATA +1 -1
- {CUQIpy-1.1.1.post0.dev86.dist-info → CUQIpy-1.1.1.post0.dev90.dist-info}/RECORD +8 -8
- cuqi/_version.py +3 -3
- cuqi/experimental/mcmc/_gibbs.py +8 -4
- cuqi/experimental/mcmc/_sampler.py +2 -2
- {CUQIpy-1.1.1.post0.dev86.dist-info → CUQIpy-1.1.1.post0.dev90.dist-info}/LICENSE +0 -0
- {CUQIpy-1.1.1.post0.dev86.dist-info → CUQIpy-1.1.1.post0.dev90.dist-info}/WHEEL +0 -0
- {CUQIpy-1.1.1.post0.dev86.dist-info → CUQIpy-1.1.1.post0.dev90.dist-info}/top_level.txt +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.dev90
|
|
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
|
cuqi/__init__.py,sha256=LsGilhl-hBLEn6Glt8S_l0OJzAA1sKit_rui8h-D-p0,488
|
|
2
2
|
cuqi/_messages.py,sha256=fzEBrZT2kbmfecBBPm7spVu7yHdxGARQB4QzXhJbCJ0,415
|
|
3
|
-
cuqi/_version.py,sha256=
|
|
3
|
+
cuqi/_version.py,sha256=T4zJHk9GS-Zo_rUrR4df7lzaYMb3K6uUw1dTyP6i5F8,509
|
|
4
4
|
cuqi/config.py,sha256=wcYvz19wkeKW2EKCGIKJiTpWt5kdaxyt4imyRkvtTRA,526
|
|
5
5
|
cuqi/diagnostics.py,sha256=5OrbJeqpynqRXOe5MtOKKhe7EAVdOEpHIqHnlMW9G_c,3029
|
|
6
6
|
cuqi/array/__init__.py,sha256=-EeiaiWGNsE3twRS4dD814BIlfxEsNkTCZUc5gjOXb0,30
|
|
@@ -39,14 +39,14 @@ cuqi/experimental/mcmc/_conjugate.py,sha256=VNPQkGity0mposcqxrx4UIeXm35EvJvZED4p
|
|
|
39
39
|
cuqi/experimental/mcmc/_conjugate_approx.py,sha256=uEnY2ea9su5ivcNagyRAwpQP2gBY98sXU7N0y5hTADo,3653
|
|
40
40
|
cuqi/experimental/mcmc/_cwmh.py,sha256=BQE7-4kbiC32TJ38rlVtfSQieoKBK5GDca3HCqHJ7zE,7135
|
|
41
41
|
cuqi/experimental/mcmc/_direct.py,sha256=9pQS_2Qk2-ybt6m8WTfPoKetcxQ00WaTRN85-Z0FrBY,777
|
|
42
|
-
cuqi/experimental/mcmc/_gibbs.py,sha256=
|
|
42
|
+
cuqi/experimental/mcmc/_gibbs.py,sha256=a_Zr007F233R6A3CJ_0zlQppsQrVuX8-oWCbNJWJxmA,12745
|
|
43
43
|
cuqi/experimental/mcmc/_hmc.py,sha256=h63KT0jYq86H541hQzhHHzuLEn7vrRE_2r1o1mTEcZo,19261
|
|
44
44
|
cuqi/experimental/mcmc/_langevin_algorithm.py,sha256=GKC_mlix3si_3J8E6I58ozh3ErB0XPmHMjV7sFyKLEQ,8200
|
|
45
45
|
cuqi/experimental/mcmc/_laplace_approximation.py,sha256=rdiE3cMQFq6FLQcOQwPpuGIxrTAp3aoGPxMDSdeopV0,5688
|
|
46
46
|
cuqi/experimental/mcmc/_mh.py,sha256=W5hOraHqfEW4_havtC9Ib2SinJtNV-NvxcOAENeTYUY,2841
|
|
47
47
|
cuqi/experimental/mcmc/_pcn.py,sha256=wqJBZLuRFSwxihaI53tumAg6AWVuceLMOmXssTetd1A,3374
|
|
48
48
|
cuqi/experimental/mcmc/_rto.py,sha256=OtzgiYCxDoTdXp7y4mkLa2upj74qadesoqHYpr11ZCg,10061
|
|
49
|
-
cuqi/experimental/mcmc/_sampler.py,sha256=
|
|
49
|
+
cuqi/experimental/mcmc/_sampler.py,sha256=S7sY7ORAPz2d7lvUhCRSg1PCbC745YXn4KVIqRYAZtw,20040
|
|
50
50
|
cuqi/experimental/mcmc/_utilities.py,sha256=kUzHbhIS3HYZRbneNBK41IogUYX5dS_bJxqEGm7TQBI,525
|
|
51
51
|
cuqi/geometry/__init__.py,sha256=Tz1WGzZBY-QGH3c0GiyKm9XHN8MGGcnU6TUHLZkzB3o,842
|
|
52
52
|
cuqi/geometry/_geometry.py,sha256=SDRZdiN2CIuS591lXxqgFoPWPIpwY-MHk75116QvdYY,46901
|
|
@@ -85,8 +85,8 @@ cuqi/testproblem/_testproblem.py,sha256=x769LwwRdJdzIiZkcQUGb_5-vynNTNALXWKato7s
|
|
|
85
85
|
cuqi/utilities/__init__.py,sha256=H7xpJe2UinjZftKvE2JuXtTi4DqtkR6uIezStAXwfGg,428
|
|
86
86
|
cuqi/utilities/_get_python_variable_name.py,sha256=QwlBVj2koJRA8s8pWd554p7-ElcI7HUwY32HknaR92E,1827
|
|
87
87
|
cuqi/utilities/_utilities.py,sha256=Jc4knn80vLoA7kgw9FzXwKVFGaNBOXiA9kgvltZU3Ao,11777
|
|
88
|
-
CUQIpy-1.1.1.post0.
|
|
89
|
-
CUQIpy-1.1.1.post0.
|
|
90
|
-
CUQIpy-1.1.1.post0.
|
|
91
|
-
CUQIpy-1.1.1.post0.
|
|
92
|
-
CUQIpy-1.1.1.post0.
|
|
88
|
+
CUQIpy-1.1.1.post0.dev90.dist-info/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
|
|
89
|
+
CUQIpy-1.1.1.post0.dev90.dist-info/METADATA,sha256=-Bz6Ib4nK13LCqO_7m0g81twfiggb13wfVF37W0Kqo4,18410
|
|
90
|
+
CUQIpy-1.1.1.post0.dev90.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
91
|
+
CUQIpy-1.1.1.post0.dev90.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
|
|
92
|
+
CUQIpy-1.1.1.post0.dev90.dist-info/RECORD,,
|
cuqi/_version.py
CHANGED
|
@@ -8,11 +8,11 @@ import json
|
|
|
8
8
|
|
|
9
9
|
version_json = '''
|
|
10
10
|
{
|
|
11
|
-
"date": "2024-09-
|
|
11
|
+
"date": "2024-09-13T08:36:06+0200",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.1.1.post0.
|
|
14
|
+
"full-revisionid": "22a43b19a36622c11b96970eff2e8ab6776a7142",
|
|
15
|
+
"version": "1.1.1.post0.dev90"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
cuqi/experimental/mcmc/_gibbs.py
CHANGED
|
@@ -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)
|
|
@@ -161,7 +165,7 @@ class HybridGibbs:
|
|
|
161
165
|
|
|
162
166
|
"""
|
|
163
167
|
|
|
164
|
-
for _ in tqdm(range(Ns)):
|
|
168
|
+
for _ in tqdm(range(Ns), "Sample: "):
|
|
165
169
|
|
|
166
170
|
self.step()
|
|
167
171
|
|
|
@@ -184,7 +188,7 @@ class HybridGibbs:
|
|
|
184
188
|
|
|
185
189
|
tune_interval = max(int(tune_freq * Nb), 1)
|
|
186
190
|
|
|
187
|
-
for idx in tqdm(range(Nb)):
|
|
191
|
+
for idx in tqdm(range(Nb), "Warmup: "):
|
|
188
192
|
|
|
189
193
|
self.step()
|
|
190
194
|
|
|
@@ -220,7 +220,7 @@ class Sampler(ABC):
|
|
|
220
220
|
if hasattr(self, "_pre_sample"): self._pre_sample()
|
|
221
221
|
|
|
222
222
|
# Draw samples
|
|
223
|
-
for _ in tqdm( range(Ns) ):
|
|
223
|
+
for _ in tqdm( range(Ns), "Sample: "):
|
|
224
224
|
|
|
225
225
|
# Perform one step of the sampler
|
|
226
226
|
acc = self.step()
|
|
@@ -260,7 +260,7 @@ class Sampler(ABC):
|
|
|
260
260
|
if hasattr(self, "_pre_warmup"): self._pre_warmup()
|
|
261
261
|
|
|
262
262
|
# Draw warmup samples with tuning
|
|
263
|
-
for idx in tqdm(range(Nb)):
|
|
263
|
+
for idx in tqdm(range(Nb), "Warmup: "):
|
|
264
264
|
|
|
265
265
|
# Perform one step of the sampler
|
|
266
266
|
acc = self.step()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|