CUQIpy 1.3.0__py3-none-any.whl → 1.4.0.post0.dev61__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.
- cuqi/__init__.py +1 -0
- cuqi/_version.py +3 -3
- cuqi/density/_density.py +9 -1
- cuqi/distribution/__init__.py +1 -1
- cuqi/distribution/_beta.py +1 -1
- cuqi/distribution/_cauchy.py +2 -2
- cuqi/distribution/_distribution.py +24 -15
- cuqi/distribution/_joint_distribution.py +97 -12
- cuqi/distribution/_posterior.py +9 -0
- cuqi/distribution/_truncated_normal.py +3 -3
- cuqi/distribution/_uniform.py +36 -2
- cuqi/experimental/__init__.py +1 -1
- cuqi/experimental/_recommender.py +216 -0
- cuqi/experimental/geometry/_productgeometry.py +3 -3
- cuqi/geometry/_geometry.py +12 -1
- cuqi/implicitprior/__init__.py +1 -1
- cuqi/implicitprior/_regularizedGaussian.py +40 -4
- cuqi/implicitprior/_restorator.py +35 -1
- cuqi/legacy/__init__.py +2 -0
- cuqi/legacy/sampler/__init__.py +11 -0
- cuqi/legacy/sampler/_conjugate.py +55 -0
- cuqi/legacy/sampler/_conjugate_approx.py +52 -0
- cuqi/legacy/sampler/_cwmh.py +196 -0
- cuqi/legacy/sampler/_gibbs.py +231 -0
- cuqi/legacy/sampler/_hmc.py +335 -0
- cuqi/legacy/sampler/_langevin_algorithm.py +198 -0
- cuqi/legacy/sampler/_laplace_approximation.py +184 -0
- cuqi/legacy/sampler/_mh.py +190 -0
- cuqi/legacy/sampler/_pcn.py +244 -0
- cuqi/{experimental/mcmc → legacy/sampler}/_rto.py +134 -152
- cuqi/legacy/sampler/_sampler.py +182 -0
- cuqi/likelihood/_likelihood.py +1 -1
- cuqi/model/_model.py +1248 -357
- cuqi/pde/__init__.py +4 -0
- cuqi/pde/_observation_map.py +36 -0
- cuqi/pde/_pde.py +133 -32
- cuqi/problem/_problem.py +88 -82
- cuqi/sampler/__init__.py +120 -8
- cuqi/sampler/_conjugate.py +376 -35
- cuqi/sampler/_conjugate_approx.py +40 -16
- cuqi/sampler/_cwmh.py +132 -138
- cuqi/{experimental/mcmc → sampler}/_direct.py +1 -1
- cuqi/sampler/_gibbs.py +269 -130
- cuqi/sampler/_hmc.py +328 -201
- cuqi/sampler/_langevin_algorithm.py +282 -98
- cuqi/sampler/_laplace_approximation.py +87 -117
- cuqi/sampler/_mh.py +47 -157
- cuqi/sampler/_pcn.py +56 -211
- cuqi/sampler/_rto.py +206 -140
- cuqi/sampler/_sampler.py +540 -135
- cuqi/solver/_solver.py +6 -2
- cuqi/testproblem/_testproblem.py +2 -3
- cuqi/utilities/__init__.py +3 -1
- cuqi/utilities/_utilities.py +94 -12
- {CUQIpy-1.3.0.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/METADATA +6 -4
- cuqipy-1.4.0.post0.dev61.dist-info/RECORD +102 -0
- {CUQIpy-1.3.0.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/WHEEL +1 -1
- CUQIpy-1.3.0.dist-info/RECORD +0 -100
- cuqi/experimental/mcmc/__init__.py +0 -123
- cuqi/experimental/mcmc/_conjugate.py +0 -345
- cuqi/experimental/mcmc/_conjugate_approx.py +0 -76
- cuqi/experimental/mcmc/_cwmh.py +0 -193
- cuqi/experimental/mcmc/_gibbs.py +0 -318
- cuqi/experimental/mcmc/_hmc.py +0 -464
- cuqi/experimental/mcmc/_langevin_algorithm.py +0 -392
- cuqi/experimental/mcmc/_laplace_approximation.py +0 -156
- cuqi/experimental/mcmc/_mh.py +0 -80
- cuqi/experimental/mcmc/_pcn.py +0 -89
- cuqi/experimental/mcmc/_sampler.py +0 -566
- cuqi/experimental/mcmc/_utilities.py +0 -17
- {CUQIpy-1.3.0.dist-info → cuqipy-1.4.0.post0.dev61.dist-info/licenses}/LICENSE +0 -0
- {CUQIpy-1.3.0.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/top_level.txt +0 -0
cuqi/solver/_solver.py
CHANGED
|
@@ -196,8 +196,11 @@ class ScipyLSQ(object):
|
|
|
196
196
|
'trf', Trust Region Reflective algorithm: for large sparse problems with bounds.
|
|
197
197
|
'dogbox', dogleg algorithm with rectangular trust regions, for small problems with bounds.
|
|
198
198
|
'lm', Levenberg-Marquardt algorithm as implemented in MINPACK. Doesn't handle bounds and sparse Jacobians.
|
|
199
|
+
tol : The numerical tolerance for convergence checks.
|
|
200
|
+
maxit : The maximum number of iterations.
|
|
201
|
+
kwargs : Additional keyword arguments passed to scipy's least_squares. Empty by default. See documentation for scipy.optimize.least_squares
|
|
199
202
|
"""
|
|
200
|
-
def __init__(self, func, x0, jacfun='2-point', method='trf', loss='linear', tol=1e-6, maxit=1e4):
|
|
203
|
+
def __init__(self, func, x0, jacfun='2-point', method='trf', loss='linear', tol=1e-6, maxit=1e4, **kwargs):
|
|
201
204
|
self.func = func
|
|
202
205
|
self.x0 = x0
|
|
203
206
|
self.jacfun = jacfun
|
|
@@ -205,6 +208,7 @@ class ScipyLSQ(object):
|
|
|
205
208
|
self.loss = loss
|
|
206
209
|
self.tol = tol
|
|
207
210
|
self.maxit = int(maxit)
|
|
211
|
+
self.kwargs = kwargs
|
|
208
212
|
|
|
209
213
|
def solve(self):
|
|
210
214
|
"""Runs optimization algorithm and returns solution and info.
|
|
@@ -215,7 +219,7 @@ class ScipyLSQ(object):
|
|
|
215
219
|
Solution found (array_like) and optimization information (dictionary).
|
|
216
220
|
"""
|
|
217
221
|
solution = least_squares(self.func, self.x0, jac=self.jacfun, \
|
|
218
|
-
method=self.method, loss=self.loss, xtol=self.tol, max_nfev=self.maxit)
|
|
222
|
+
method=self.method, loss=self.loss, xtol=self.tol, max_nfev=self.maxit, **self.kwargs)
|
|
219
223
|
info = {"success": solution['success'],
|
|
220
224
|
"message": solution['message'],
|
|
221
225
|
"func": solution['fun'],
|
cuqi/testproblem/_testproblem.py
CHANGED
|
@@ -863,10 +863,9 @@ class Heat1D(BayesianProblem):
|
|
|
863
863
|
# Bayesian model
|
|
864
864
|
x = cuqi.distribution.Gaussian(np.zeros(model.domain_dim), 1)
|
|
865
865
|
y = cuqi.distribution.Gaussian(model(x), sigma2)
|
|
866
|
-
|
|
867
|
-
# Initialize Deconvolution as BayesianProblem problem
|
|
868
|
-
super().__init__(y, x, y=data)
|
|
869
866
|
|
|
867
|
+
# Initialize Heat1D as BayesianProblem problem
|
|
868
|
+
super().__init__(y, x, y=data)
|
|
870
869
|
# Store exact values
|
|
871
870
|
self.exactSolution = x_exact
|
|
872
871
|
self.exactData = y_exact
|
cuqi/utilities/__init__.py
CHANGED
|
@@ -14,8 +14,10 @@ from ._utilities import (
|
|
|
14
14
|
plot_1D_density,
|
|
15
15
|
plot_2D_density,
|
|
16
16
|
count_nonzero,
|
|
17
|
+
count_within_bounds,
|
|
17
18
|
count_constant_components_1D,
|
|
18
|
-
count_constant_components_2D
|
|
19
|
+
count_constant_components_2D,
|
|
20
|
+
piecewise_linear_1D_DoF
|
|
19
21
|
)
|
|
20
22
|
|
|
21
23
|
from ._get_python_variable_name import _get_python_variable_name
|
cuqi/utilities/_utilities.py
CHANGED
|
@@ -188,7 +188,7 @@ def approx_derivative(func, wrt, direction=None, epsilon=np.sqrt(np.finfo(float)
|
|
|
188
188
|
# We compute the Jacobian matrix of func using forward differences.
|
|
189
189
|
# If the function is scalar-valued, we compute the gradient instead.
|
|
190
190
|
# If the direction is provided, we compute the direction-Jacobian product.
|
|
191
|
-
wrt =
|
|
191
|
+
wrt = force_ndarray(wrt, flatten=True)
|
|
192
192
|
f0 = func(wrt)
|
|
193
193
|
Matr = np.zeros([infer_len(wrt), infer_len(f0)])
|
|
194
194
|
dx = np.zeros(len(wrt))
|
|
@@ -360,8 +360,29 @@ def count_nonzero(x, threshold = 1e-6):
|
|
|
360
360
|
Theshold for considering a value as nonzero.
|
|
361
361
|
"""
|
|
362
362
|
return np.sum([np.abs(v) >= threshold for v in x])
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
def count_within_bounds(x, lower_bounds, upper_bounds, threshold = 1e-6, exception = np.nan):
|
|
366
|
+
""" Returns the number of values in an array whose value lies between the provided lower and upper bounds.
|
|
367
|
+
|
|
368
|
+
Parameters
|
|
369
|
+
----------
|
|
370
|
+
x : `np.ndarray`
|
|
371
|
+
Array to count elements of.
|
|
372
|
+
|
|
373
|
+
lower_bounds : `np.ndarray`
|
|
374
|
+
Lower bound on values to disregard when counting.
|
|
375
|
+
|
|
376
|
+
upper_bounds : `np.ndarray`
|
|
377
|
+
Upper bound on values to disregard.
|
|
378
|
+
|
|
379
|
+
threshold : float
|
|
380
|
+
Theshold for considering a value as nonzero.
|
|
381
|
+
"""
|
|
382
|
+
return np.sum([l + threshold <= v and v <= u - threshold and not (exception - threshold <= v and v <= exception + threshold) for v, l, u in zip(x, lower_bounds, upper_bounds)])
|
|
383
|
+
|
|
363
384
|
|
|
364
|
-
def count_constant_components_1D(x, threshold = 1e-2, lower = -np.inf, upper = np.inf):
|
|
385
|
+
def count_constant_components_1D(x, threshold = 1e-2, lower = -np.inf, upper = np.inf, exception = np.nan):
|
|
365
386
|
""" Returns the number of piecewise constant components in a one-dimensional array
|
|
366
387
|
|
|
367
388
|
Parameters
|
|
@@ -372,29 +393,40 @@ def count_constant_components_1D(x, threshold = 1e-2, lower = -np.inf, upper = n
|
|
|
372
393
|
threshold : float
|
|
373
394
|
Strict theshold on when the difference of neighbouring values is considered zero.
|
|
374
395
|
|
|
375
|
-
lower : float
|
|
396
|
+
lower : float or numpy.ndarray
|
|
376
397
|
Piecewise constant components below this value are not counted.
|
|
377
398
|
|
|
378
|
-
upper : float
|
|
399
|
+
upper : float or numpy.ndarray
|
|
379
400
|
Piecewise constant components above this value are not counted.
|
|
380
401
|
"""
|
|
381
402
|
|
|
403
|
+
if not isinstance(lower, np.ndarray):
|
|
404
|
+
lower = lower*np.ones_like(x)
|
|
405
|
+
|
|
406
|
+
if not isinstance(upper, np.ndarray):
|
|
407
|
+
upper = upper*np.ones_like(x)
|
|
408
|
+
|
|
382
409
|
counter = 0
|
|
383
|
-
|
|
410
|
+
index = 0
|
|
411
|
+
if (x[index] > lower[index] and
|
|
412
|
+
x[index] < upper[index] and
|
|
413
|
+
not (exception - threshold <= x[index] and x[index] <= exception + threshold)):
|
|
384
414
|
counter += 1
|
|
385
415
|
|
|
386
416
|
x_previous = x[0]
|
|
387
417
|
|
|
388
418
|
for x_current in x[1:]:
|
|
419
|
+
index += 1
|
|
389
420
|
if (abs(x_previous - x_current) >= threshold and
|
|
390
|
-
x_current > lower and
|
|
391
|
-
x_current < upper
|
|
421
|
+
x_current > lower[index] and
|
|
422
|
+
x_current < upper[index] and
|
|
423
|
+
not (exception - threshold <= x_current and x_current <= exception + threshold)):
|
|
392
424
|
counter += 1
|
|
393
425
|
|
|
394
426
|
x_previous = x_current
|
|
395
427
|
|
|
396
428
|
return counter
|
|
397
|
-
|
|
429
|
+
|
|
398
430
|
def count_constant_components_2D(x, threshold = 1e-2, lower = -np.inf, upper = np.inf):
|
|
399
431
|
""" Returns the number of piecewise constant components in a two-dimensional array
|
|
400
432
|
|
|
@@ -406,12 +438,19 @@ def count_constant_components_2D(x, threshold = 1e-2, lower = -np.inf, upper = n
|
|
|
406
438
|
threshold : float
|
|
407
439
|
Strict theshold on when the difference of neighbouring values is considered zero.
|
|
408
440
|
|
|
409
|
-
lower : float
|
|
441
|
+
lower : float or numpy.ndarray
|
|
410
442
|
Piecewise constant components below this value are not counted.
|
|
411
443
|
|
|
412
|
-
upper : float
|
|
444
|
+
upper : float or numpy.ndarray
|
|
413
445
|
Piecewise constant components above this value are not counted.
|
|
414
446
|
"""
|
|
447
|
+
|
|
448
|
+
if not isinstance(lower, np.ndarray):
|
|
449
|
+
lower = lower*np.ones_like(x)
|
|
450
|
+
|
|
451
|
+
if not isinstance(upper, np.ndarray):
|
|
452
|
+
upper = upper*np.ones_like(x)
|
|
453
|
+
|
|
415
454
|
filled = np.zeros_like(x, dtype = int)
|
|
416
455
|
counter = 0
|
|
417
456
|
|
|
@@ -438,8 +477,51 @@ def count_constant_components_2D(x, threshold = 1e-2, lower = -np.inf, upper = n
|
|
|
438
477
|
for i in range(x.shape[0]):
|
|
439
478
|
for j in range(x.shape[1]):
|
|
440
479
|
if filled[i,j] == 0:
|
|
441
|
-
if x[i,j] > lower and x[i,j] < upper:
|
|
480
|
+
if x[i,j] > lower[i,j] and x[i,j] < upper[i,j]:
|
|
442
481
|
counter += 1
|
|
443
482
|
process(i, j)
|
|
444
483
|
return counter
|
|
445
|
-
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
def piecewise_linear_1D_DoF(x, threshold = 1e-5, exception_zero = False, exception_flat = False):
|
|
488
|
+
""" Returns the degrees of freedom of a piecewise linear signal.
|
|
489
|
+
Assuming linear interpolation, this corresponds to the number of non-differentiable points, including end-points.
|
|
490
|
+
|
|
491
|
+
Parameters
|
|
492
|
+
----------
|
|
493
|
+
x : `np.ndarray`
|
|
494
|
+
1D Array to compute degrees of freedom of.
|
|
495
|
+
|
|
496
|
+
threshold : float
|
|
497
|
+
Strict theshold on when values are considered zero.
|
|
498
|
+
|
|
499
|
+
exception_zero : Boolean
|
|
500
|
+
Whether a zero piecewise linear components should be considered.
|
|
501
|
+
|
|
502
|
+
exception_flat : Boolean
|
|
503
|
+
Whether a flat piecewise linear components should be considered.
|
|
504
|
+
"""
|
|
505
|
+
|
|
506
|
+
differences = x[1:] - x[:-1]
|
|
507
|
+
double_differences = differences[1:] - differences[:-1]
|
|
508
|
+
|
|
509
|
+
joints = [True] + [np.abs(d) >= threshold for d in double_differences] + [True]
|
|
510
|
+
|
|
511
|
+
if not exception_zero and not exception_flat:
|
|
512
|
+
return np.sum(joints)
|
|
513
|
+
elif exception_zero:
|
|
514
|
+
return np.sum(joints and [np.abs(v) < threshold for v in x])
|
|
515
|
+
elif exception_flat:
|
|
516
|
+
prev_joint = None
|
|
517
|
+
counter = 0
|
|
518
|
+
for i in range(len(joints)):
|
|
519
|
+
if joints[i]:
|
|
520
|
+
counter += 1
|
|
521
|
+
if prev_joint is None:
|
|
522
|
+
prev_joint = i
|
|
523
|
+
else:
|
|
524
|
+
if np.abs(x[i] - x[prev_joint]) < threshold:
|
|
525
|
+
counter -= 1
|
|
526
|
+
prev_joint = i
|
|
527
|
+
return counter
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0.post0.dev61
|
|
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
|
|
@@ -197,14 +197,16 @@ Project-URL: Source, https://github.com/CUQI-DTU/CUQIpy
|
|
|
197
197
|
Project-URL: Documentation, https://cuqi-dtu.github.io/CUQIpy/
|
|
198
198
|
Project-URL: Download, https://github.com/CUQI-DTU/CUQIpy/releases
|
|
199
199
|
Project-URL: Tracker, https://github.com/CUQI-DTU/CUQIpy/issues
|
|
200
|
-
Requires-Python: >=3.
|
|
200
|
+
Requires-Python: >=3.9
|
|
201
201
|
Description-Content-Type: text/markdown
|
|
202
202
|
License-File: LICENSE
|
|
203
203
|
Requires-Dist: matplotlib
|
|
204
204
|
Requires-Dist: numpy>=1.17.0
|
|
205
|
-
Requires-Dist: scipy
|
|
205
|
+
Requires-Dist: scipy==1.12.0; python_version <= "3.9"
|
|
206
|
+
Requires-Dist: scipy; python_version > "3.9"
|
|
206
207
|
Requires-Dist: arviz
|
|
207
208
|
Requires-Dist: tqdm
|
|
209
|
+
Dynamic: license-file
|
|
208
210
|
|
|
209
211
|
<div align="center">
|
|
210
212
|
<img src="https://cuqi-dtu.github.io/CUQIpy/_static/logo.png" alt="CUQIpy logo" width="250"/>
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
cuqi/__init__.py,sha256=TIdTvq0th4ywHVNGFovmEzneXxkpGWC-LlUdrxbPPLM,509
|
|
2
|
+
cuqi/_messages.py,sha256=fzEBrZT2kbmfecBBPm7spVu7yHdxGARQB4QzXhJbCJ0,415
|
|
3
|
+
cuqi/_version.py,sha256=S2ddEKfXvlEJwt4HQ_HYcSdVnIse2ZS69CQGg95CvD8,509
|
|
4
|
+
cuqi/config.py,sha256=wcYvz19wkeKW2EKCGIKJiTpWt5kdaxyt4imyRkvtTRA,526
|
|
5
|
+
cuqi/diagnostics.py,sha256=5OrbJeqpynqRXOe5MtOKKhe7EAVdOEpHIqHnlMW9G_c,3029
|
|
6
|
+
cuqi/array/__init__.py,sha256=-EeiaiWGNsE3twRS4dD814BIlfxEsNkTCZUc5gjOXb0,30
|
|
7
|
+
cuqi/array/_array.py,sha256=UJoWyQjDpl8g2q4wuuz_ufpr2JoYL0BbCxrxZpZR99I,4303
|
|
8
|
+
cuqi/data/__init__.py,sha256=1aGgPmtG_Kqbb880vLnPksGvyYQB_6o2mz_q-4KGYaU,173
|
|
9
|
+
cuqi/data/_data.py,sha256=PgdYJ6MHgNY37Ak8wUYwvxcAwOYSNjnf1-BXMdbnuv4,10716
|
|
10
|
+
cuqi/data/astronaut.npz,sha256=vVTb6eJLMZhrEZuOYzQWN3V2EhhVH6sHzrrf_7mstcw,786696
|
|
11
|
+
cuqi/data/camera.npz,sha256=EznyKfAomn4orm-L9gqM3QDFNuGB5XZwpZZMwDgiMKk,262408
|
|
12
|
+
cuqi/data/cat.npz,sha256=9H9iJqkvlCCVZZ2IWMfwwfVHbShpQTkZo_WGr7rrp3k,406164
|
|
13
|
+
cuqi/data/cookie.png,sha256=mr6wUeoIUc5VC2qYj8vafOmTbcRwz0fHz4IIPK9_PnE,984680
|
|
14
|
+
cuqi/data/satellite.mat,sha256=a0Nz_Ak-Y0m360dH74pa_rpk-MhaQ91ftGTKhQX7I8g,16373
|
|
15
|
+
cuqi/density/__init__.py,sha256=0zfVcPgqdqiPkss5n_WP_PUt-G3ovHXjokhqEKIlLwA,48
|
|
16
|
+
cuqi/density/_density.py,sha256=Pfcq8b9MuTAuXxVwORRyNru_KIAFN1yHp2Y1yNwdyrg,7467
|
|
17
|
+
cuqi/distribution/__init__.py,sha256=f-HM-SUrvPO66_FAJ6k4TffBq4H94OusRMDOJgcJU2w,779
|
|
18
|
+
cuqi/distribution/_beta.py,sha256=QlibnuHNcvWjl-du5aRc9QuzS3n4PsyD_8Nc47w-E0Q,2903
|
|
19
|
+
cuqi/distribution/_cauchy.py,sha256=Qwi21WkwUBnBkLbhR-yCGO0tQ_U_3mmvR0pDMPPPB5c,3296
|
|
20
|
+
cuqi/distribution/_cmrf.py,sha256=tCbEulM_O7FB3C_W-3IqZp9zGHkTofCdFF0ybHc9UZI,3745
|
|
21
|
+
cuqi/distribution/_custom.py,sha256=11lnAG7CS15bpV6JOOP--2YyKnAduvXY1IjAOJ1tqO0,10504
|
|
22
|
+
cuqi/distribution/_distribution.py,sha256=FWwJy6kM-MYEfN0Dv7DbLL7JHl_VDNAvNe-GqiLiRBc,18290
|
|
23
|
+
cuqi/distribution/_gamma.py,sha256=VcvBJS51N-MxuX42r9L2j2QYRlzhdgAtQ6Wa5IFO_YE,3536
|
|
24
|
+
cuqi/distribution/_gaussian.py,sha256=3L1L_3W6i6YuPQ8vnFmju5QsvkLlg4VsgCnj11lYBUE,32977
|
|
25
|
+
cuqi/distribution/_gmrf.py,sha256=OwId8qQWEtmC2fxVhL4iBHZnc8ZCrZzfV6yGXDE3k30,9522
|
|
26
|
+
cuqi/distribution/_inverse_gamma.py,sha256=oPJuiYp3O1m547pmmIz9OWesky9YpwLTHT7-9MmcYss,3159
|
|
27
|
+
cuqi/distribution/_joint_distribution.py,sha256=ALOnQsIrzE8Rx_FYOs4f276u4QZQeN_e0CLC7CJpb-E,20396
|
|
28
|
+
cuqi/distribution/_laplace.py,sha256=5exLvlzJm2AgfvZ3KUSkjfwlGwwbsktBxP8z0iLMik8,1401
|
|
29
|
+
cuqi/distribution/_lmrf.py,sha256=rdGoQ-fPe1oW6Z29P-l3woq0NX3_RxUQ2rzm1VzemNM,3290
|
|
30
|
+
cuqi/distribution/_lognormal.py,sha256=8_hOFQ3iu88ujX8vxmfVEZ0fdmlhTY98PlG5PasPjEg,2612
|
|
31
|
+
cuqi/distribution/_modifiedhalfnormal.py,sha256=ErULXUFRjbMyCYywaOzfuxtoy-XQmC0McMROo2mTQtc,7313
|
|
32
|
+
cuqi/distribution/_normal.py,sha256=vhIiAseW09IKh1uy0KUq7RP1IuY7hH5aNM1W_R8Gd_Q,2912
|
|
33
|
+
cuqi/distribution/_posterior.py,sha256=6LxXAIBzFxyEqx5bUfgqTXVKgXxqNhRItec6FcRVLEE,5350
|
|
34
|
+
cuqi/distribution/_smoothed_laplace.py,sha256=p-1Y23mYA9omwiHGkEuv3T2mwcPAAoNlCr7T8osNkjE,2925
|
|
35
|
+
cuqi/distribution/_truncated_normal.py,sha256=_ez3MmO6qpBeP6BKCUlW3IgxuF7k--A7jPGPUhtYK0g,4240
|
|
36
|
+
cuqi/distribution/_uniform.py,sha256=fVgj_4SBav8JMc1pNAO1l_CZ9ZwdoMIpN9iQ3i9_Z0Q,3255
|
|
37
|
+
cuqi/experimental/__init__.py,sha256=HCI1aG9xn4XPnBfGbCRrFaq3JfmVyBH09IuvdDancsY,154
|
|
38
|
+
cuqi/experimental/_recommender.py,sha256=ulW69nDGwkB8X93OMgMVLcVz2L0T3SZqHKG7jZ9wNm8,7907
|
|
39
|
+
cuqi/experimental/algebra/__init__.py,sha256=btRAWG58ZfdtK0afXKOg60AX7d76KMBjlZa4AWBCCgU,81
|
|
40
|
+
cuqi/experimental/algebra/_ast.py,sha256=PdPz19cJMjvnMx4KEzhn4gvxIZX_UViE33Mbttj_5Xw,9873
|
|
41
|
+
cuqi/experimental/algebra/_orderedset.py,sha256=fKysh4pmI4xF7Y5Z6O86ABzg20o4uBs-v8jmLBMrdpo,2849
|
|
42
|
+
cuqi/experimental/algebra/_randomvariable.py,sha256=isbFtIWsWXF-yF5Vb56nLy4MCkQM6akjd-dQau4wfbE,19725
|
|
43
|
+
cuqi/experimental/geometry/__init__.py,sha256=kgoKegfz3Jhr7fpORB_l55z9zLZRtloTLyXFDh1oF2o,47
|
|
44
|
+
cuqi/experimental/geometry/_productgeometry.py,sha256=IlBmmKsWE-aRZHp6no9gUXGRfkHlgM0CdPBx1hax9HI,7199
|
|
45
|
+
cuqi/geometry/__init__.py,sha256=Tz1WGzZBY-QGH3c0GiyKm9XHN8MGGcnU6TUHLZkzB3o,842
|
|
46
|
+
cuqi/geometry/_geometry.py,sha256=W-oQTZPelVS7fN9qZj6bNBuh-yY0eqOHJ39UwB-WmQY,47562
|
|
47
|
+
cuqi/implicitprior/__init__.py,sha256=6Fl4Lmld8ikg9sW9tReKRGTCJC6_WCTExHaYuIv34nM,323
|
|
48
|
+
cuqi/implicitprior/_regularizedGMRF.py,sha256=BUeT4rwJzary9K56fkxCNGCeKZd-2VSgOT8XNHxFPRE,6345
|
|
49
|
+
cuqi/implicitprior/_regularizedGaussian.py,sha256=9BSKHGEW0OT9OIt_42strDzxBM8mB6A-blcf0kEguHw,21836
|
|
50
|
+
cuqi/implicitprior/_regularizedUnboundedUniform.py,sha256=uHGYYnTjVxdPbY-5JwocFOH0sHRfGrrLiHWahzH9R8A,3533
|
|
51
|
+
cuqi/implicitprior/_restorator.py,sha256=KxaC5QHdu8mTXJnOAVIBqe7-6D58sGKbKhDobyrYosA,11569
|
|
52
|
+
cuqi/legacy/__init__.py,sha256=KEIAkfTQUW7CM7ekOVRAD6E7QGwehHN5bBlfGxByttQ,106
|
|
53
|
+
cuqi/legacy/sampler/__init__.py,sha256=D-dYa0gFgIwQukP8_VKhPGmlGKXbvVo7YqaET4SdAeQ,382
|
|
54
|
+
cuqi/legacy/sampler/_conjugate.py,sha256=x5OsFk1zDm2tvoFsSxbCKwjSqBHUGbcUvcTwDOvL-tw,2841
|
|
55
|
+
cuqi/legacy/sampler/_conjugate_approx.py,sha256=xX-X71EgxGnZooOY6CIBhuJTs3dhcKfoLnoFxX3CO2g,1938
|
|
56
|
+
cuqi/legacy/sampler/_cwmh.py,sha256=xft9_oEh52W5GpnnDK8ZRK--RseymINQlYLhYdtRNnk,7789
|
|
57
|
+
cuqi/legacy/sampler/_gibbs.py,sha256=1UItwYlj17JcJhqCYCfDw1x39o82Y1q9ykJ6zG19ppE,8965
|
|
58
|
+
cuqi/legacy/sampler/_hmc.py,sha256=6fSWjDLZcZH28X21h9Uq9RhgKGXUOamy-2wqJ_WR-qc,15041
|
|
59
|
+
cuqi/legacy/sampler/_langevin_algorithm.py,sha256=JknIc9k68JYcQz601ald6yNTtE7ILw-shxx7X0_fGUI,7882
|
|
60
|
+
cuqi/legacy/sampler/_laplace_approximation.py,sha256=CvMQmMxi_XmaIdWrs9tsu4NTty7uSm4jIlb_zrQaW0w,6572
|
|
61
|
+
cuqi/legacy/sampler/_mh.py,sha256=hmNfEBUihDHE2g4wKkwxUEuPj_1at7Mrpt2w9OMHX0M,7076
|
|
62
|
+
cuqi/legacy/sampler/_pcn.py,sha256=PlMGwsI0ZCDfrAT95u-5uvdYdD2lkaLhnQZCsBFl_Y0,8622
|
|
63
|
+
cuqi/legacy/sampler/_rto.py,sha256=bfVKgk-2NnrkTnRaZvs2zIfiWSbElIYx0zaMu6lab-s,11935
|
|
64
|
+
cuqi/legacy/sampler/_sampler.py,sha256=hw5BNhnFkERGtdvZ4Gd_QQZYshNiU_Jx-Yl1--x5HAs,6023
|
|
65
|
+
cuqi/likelihood/__init__.py,sha256=QXif382iwZ5bT3ZUqmMs_n70JVbbjxbqMrlQYbMn4Zo,1776
|
|
66
|
+
cuqi/likelihood/_likelihood.py,sha256=I12qQF3h_Z8jj7zb_AYD-SEUn34VCU7VxcTcH25Axao,7074
|
|
67
|
+
cuqi/model/__init__.py,sha256=jgY2-jyxEMC79vkyH9BpfowW7_DbMRjqedOtO5fykXQ,62
|
|
68
|
+
cuqi/model/_model.py,sha256=VwNTBlqQ94k_SQB_Y4ADqMOsrrNCcLMii3n-oTAiMv0,75120
|
|
69
|
+
cuqi/operator/__init__.py,sha256=0pc9p-KPyl7KtPV0noB0ddI0CP2iYEHw5rbw49D8Njk,136
|
|
70
|
+
cuqi/operator/_operator.py,sha256=yNwPTh7jR07AiKMbMQQ5_54EgirlKFsbq9JN1EODaQI,8856
|
|
71
|
+
cuqi/pde/__init__.py,sha256=pExaUnEvdNtgL9sQachcKkbDilE87rRiUTKk4hd2zSM,158
|
|
72
|
+
cuqi/pde/_observation_map.py,sha256=0WbGkxukE9PNMnQNkFoeAdKBSzhnnzOrDiqh59tjsMY,1407
|
|
73
|
+
cuqi/pde/_pde.py,sha256=voneMZcSv4kX-SMsIOhRLIrB_LYEXu0-Ex-Ivt3BTMs,17764
|
|
74
|
+
cuqi/problem/__init__.py,sha256=JxJty4JqHTOqSG6NeTGiXRQ7OLxiRK9jvVq3lXLeIRw,38
|
|
75
|
+
cuqi/problem/_problem.py,sha256=8pq9z0VguW1vIJj35msGG1KdCI7gDb7-fEq59mNbsUI,38577
|
|
76
|
+
cuqi/sampler/__init__.py,sha256=7H8gmUJ6Woezc6RcXj1nARt8CF59ILeOxryQr9li9jU,4616
|
|
77
|
+
cuqi/sampler/_conjugate.py,sha256=QeQI-ZH4OK_wIIygWLM7dNkH0TSVixdb-VUBFc2prw4,22049
|
|
78
|
+
cuqi/sampler/_conjugate_approx.py,sha256=LXPykdG-2KKCCIsxeu4G4Iu6BcAtujtAVOJTGV_aRbc,3525
|
|
79
|
+
cuqi/sampler/_cwmh.py,sha256=0CVKuFuD5-99ipXF-EQ5T5RpYORWriugzttNu6xM7Ik,7320
|
|
80
|
+
cuqi/sampler/_direct.py,sha256=tyVoC9lOGrdR4T0bQUlRewC8uDaenIV61Jk3NEttVVw,767
|
|
81
|
+
cuqi/sampler/_gibbs.py,sha256=H8ZYoNGyQun2u9dU86HDfr5Z1zZO9AnwkeATgS3Jer8,13971
|
|
82
|
+
cuqi/sampler/_hmc.py,sha256=yQ0mq51sRMLICRXIdDZLNzlJLt-03OecDOsMkADb-sI,19462
|
|
83
|
+
cuqi/sampler/_langevin_algorithm.py,sha256=2FubHq6p5MruHx8hwLRQXHoHqf5POO4JR6UAkBWV6r4,15029
|
|
84
|
+
cuqi/sampler/_laplace_approximation.py,sha256=tfsfbHhMA_q0pcNF5X8SYT6bWWzY5BSC-hKKRdSaGUI,5906
|
|
85
|
+
cuqi/sampler/_mh.py,sha256=WsVmpvkhvYuFoUvXevOYibIwmhvaKY4YXrkEsF_5YvY,2931
|
|
86
|
+
cuqi/sampler/_pcn.py,sha256=vilU7YjU2WrK5b4bh4VAv8a8TTgj1f9Osivcf3kUlFQ,3364
|
|
87
|
+
cuqi/sampler/_rto.py,sha256=AQFi8Kqa3uQZsZxdpPb2B9Is_lyfz1v8l9JAY3e4J2w,17186
|
|
88
|
+
cuqi/sampler/_sampler.py,sha256=7_a9i6A7AX3NNz7qK1jTsEYt6bFCUR5WK464KfH_Kvc,21034
|
|
89
|
+
cuqi/samples/__init__.py,sha256=vCs6lVk-pi8RBqa6cIN5wyn6u-K9oEf1Na4k1ZMrYv8,44
|
|
90
|
+
cuqi/samples/_samples.py,sha256=hUc8OnCF9CTCuDTrGHwwzv3wp8mG_6vsJAFvuQ-x0uA,35832
|
|
91
|
+
cuqi/solver/__init__.py,sha256=KYgAi_8VoAwljTB3S2I87YnJkRtedskLee7hQp_-zp8,220
|
|
92
|
+
cuqi/solver/_solver.py,sha256=X3EWD-26o9UOBsWRuy0ktYsJiUXwpCGm0lvTdQM6dRI,30964
|
|
93
|
+
cuqi/testproblem/__init__.py,sha256=DWTOcyuNHMbhEuuWlY5CkYkNDSAqhvsKmJXBLivyblU,202
|
|
94
|
+
cuqi/testproblem/_testproblem.py,sha256=EJWG_zXUtmo6GlHBZFqHlRpDC_48tE0XZEu0_C66NS8,52524
|
|
95
|
+
cuqi/utilities/__init__.py,sha256=d5QXRzmI6EchS9T4b7eTezSisPWuWklO8ey4YBx9kI0,569
|
|
96
|
+
cuqi/utilities/_get_python_variable_name.py,sha256=wxpCaj9f3ZtBNqlGmmuGiITgBaTsY-r94lUIlK6UAU4,2043
|
|
97
|
+
cuqi/utilities/_utilities.py,sha256=R7BdNysrE36a4D729DvfrTisWY4paP5nfqdkQxSX3Mg,18431
|
|
98
|
+
cuqipy-1.4.0.post0.dev61.dist-info/licenses/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
|
|
99
|
+
cuqipy-1.4.0.post0.dev61.dist-info/METADATA,sha256=8RwtR0AsvJQF8RQuPlj-VpzmMlNRt0bws6uMjfUQf9c,18623
|
|
100
|
+
cuqipy-1.4.0.post0.dev61.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
101
|
+
cuqipy-1.4.0.post0.dev61.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
|
|
102
|
+
cuqipy-1.4.0.post0.dev61.dist-info/RECORD,,
|
CUQIpy-1.3.0.dist-info/RECORD
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
cuqi/__init__.py,sha256=LsGilhl-hBLEn6Glt8S_l0OJzAA1sKit_rui8h-D-p0,488
|
|
2
|
-
cuqi/_messages.py,sha256=fzEBrZT2kbmfecBBPm7spVu7yHdxGARQB4QzXhJbCJ0,415
|
|
3
|
-
cuqi/_version.py,sha256=Zh5IDN88YrpU6u7KgkSFU7UYE76W-qDaHdrTsYo2eYA,497
|
|
4
|
-
cuqi/config.py,sha256=wcYvz19wkeKW2EKCGIKJiTpWt5kdaxyt4imyRkvtTRA,526
|
|
5
|
-
cuqi/diagnostics.py,sha256=5OrbJeqpynqRXOe5MtOKKhe7EAVdOEpHIqHnlMW9G_c,3029
|
|
6
|
-
cuqi/array/__init__.py,sha256=-EeiaiWGNsE3twRS4dD814BIlfxEsNkTCZUc5gjOXb0,30
|
|
7
|
-
cuqi/array/_array.py,sha256=UJoWyQjDpl8g2q4wuuz_ufpr2JoYL0BbCxrxZpZR99I,4303
|
|
8
|
-
cuqi/data/__init__.py,sha256=1aGgPmtG_Kqbb880vLnPksGvyYQB_6o2mz_q-4KGYaU,173
|
|
9
|
-
cuqi/data/_data.py,sha256=PgdYJ6MHgNY37Ak8wUYwvxcAwOYSNjnf1-BXMdbnuv4,10716
|
|
10
|
-
cuqi/data/astronaut.npz,sha256=vVTb6eJLMZhrEZuOYzQWN3V2EhhVH6sHzrrf_7mstcw,786696
|
|
11
|
-
cuqi/data/camera.npz,sha256=EznyKfAomn4orm-L9gqM3QDFNuGB5XZwpZZMwDgiMKk,262408
|
|
12
|
-
cuqi/data/cat.npz,sha256=9H9iJqkvlCCVZZ2IWMfwwfVHbShpQTkZo_WGr7rrp3k,406164
|
|
13
|
-
cuqi/data/cookie.png,sha256=mr6wUeoIUc5VC2qYj8vafOmTbcRwz0fHz4IIPK9_PnE,984680
|
|
14
|
-
cuqi/data/satellite.mat,sha256=a0Nz_Ak-Y0m360dH74pa_rpk-MhaQ91ftGTKhQX7I8g,16373
|
|
15
|
-
cuqi/density/__init__.py,sha256=0zfVcPgqdqiPkss5n_WP_PUt-G3ovHXjokhqEKIlLwA,48
|
|
16
|
-
cuqi/density/_density.py,sha256=BG7gtP0cbFYLVgjYQGkNAhM95PR5ocBVLKRlOVX2PyM,7253
|
|
17
|
-
cuqi/distribution/__init__.py,sha256=Vvw-ge5HAF1now9n4rcwDicCsEUN9_jbbxlKxyzeUuY,761
|
|
18
|
-
cuqi/distribution/_beta.py,sha256=lgN6PGoF9RXQtrMGqSaSBV0hw-LEsOfRTD2Q2L3-Ok4,2903
|
|
19
|
-
cuqi/distribution/_cauchy.py,sha256=UsVXYz8HhagXN5fIWSAIyELqhsJAX_-wk9kkRGgRmA8,3296
|
|
20
|
-
cuqi/distribution/_cmrf.py,sha256=tCbEulM_O7FB3C_W-3IqZp9zGHkTofCdFF0ybHc9UZI,3745
|
|
21
|
-
cuqi/distribution/_custom.py,sha256=11lnAG7CS15bpV6JOOP--2YyKnAduvXY1IjAOJ1tqO0,10504
|
|
22
|
-
cuqi/distribution/_distribution.py,sha256=mDSOjm2-f1we9wbfii2QEZ8gx03X_iZDt9XY4AGlOvE,17982
|
|
23
|
-
cuqi/distribution/_gamma.py,sha256=VcvBJS51N-MxuX42r9L2j2QYRlzhdgAtQ6Wa5IFO_YE,3536
|
|
24
|
-
cuqi/distribution/_gaussian.py,sha256=3L1L_3W6i6YuPQ8vnFmju5QsvkLlg4VsgCnj11lYBUE,32977
|
|
25
|
-
cuqi/distribution/_gmrf.py,sha256=OwId8qQWEtmC2fxVhL4iBHZnc8ZCrZzfV6yGXDE3k30,9522
|
|
26
|
-
cuqi/distribution/_inverse_gamma.py,sha256=oPJuiYp3O1m547pmmIz9OWesky9YpwLTHT7-9MmcYss,3159
|
|
27
|
-
cuqi/distribution/_joint_distribution.py,sha256=vadRTOpQh1skAgnf-f2-2e6IMvoH2d8beriDvjh236g,16709
|
|
28
|
-
cuqi/distribution/_laplace.py,sha256=5exLvlzJm2AgfvZ3KUSkjfwlGwwbsktBxP8z0iLMik8,1401
|
|
29
|
-
cuqi/distribution/_lmrf.py,sha256=rdGoQ-fPe1oW6Z29P-l3woq0NX3_RxUQ2rzm1VzemNM,3290
|
|
30
|
-
cuqi/distribution/_lognormal.py,sha256=8_hOFQ3iu88ujX8vxmfVEZ0fdmlhTY98PlG5PasPjEg,2612
|
|
31
|
-
cuqi/distribution/_modifiedhalfnormal.py,sha256=ErULXUFRjbMyCYywaOzfuxtoy-XQmC0McMROo2mTQtc,7313
|
|
32
|
-
cuqi/distribution/_normal.py,sha256=vhIiAseW09IKh1uy0KUq7RP1IuY7hH5aNM1W_R8Gd_Q,2912
|
|
33
|
-
cuqi/distribution/_posterior.py,sha256=zAfL0GECxekZ2lBt1W6_LN0U_xskMwK4VNce5xAF7ig,5018
|
|
34
|
-
cuqi/distribution/_smoothed_laplace.py,sha256=p-1Y23mYA9omwiHGkEuv3T2mwcPAAoNlCr7T8osNkjE,2925
|
|
35
|
-
cuqi/distribution/_truncated_normal.py,sha256=sZkLYgnkGOyS_3ZxY7iw6L62t-Jh6shzsweRsRepN2k,4240
|
|
36
|
-
cuqi/distribution/_uniform.py,sha256=KA8yQ6ZS3nQGS4PYJ4hpDg6Eq8EQKQvPsIpYfR8fj2w,1967
|
|
37
|
-
cuqi/experimental/__init__.py,sha256=bIQ9OroeitHbwgNe3wI_JvzkILK0N25Tt7wpquPoU3w,129
|
|
38
|
-
cuqi/experimental/algebra/__init__.py,sha256=btRAWG58ZfdtK0afXKOg60AX7d76KMBjlZa4AWBCCgU,81
|
|
39
|
-
cuqi/experimental/algebra/_ast.py,sha256=PdPz19cJMjvnMx4KEzhn4gvxIZX_UViE33Mbttj_5Xw,9873
|
|
40
|
-
cuqi/experimental/algebra/_orderedset.py,sha256=fKysh4pmI4xF7Y5Z6O86ABzg20o4uBs-v8jmLBMrdpo,2849
|
|
41
|
-
cuqi/experimental/algebra/_randomvariable.py,sha256=isbFtIWsWXF-yF5Vb56nLy4MCkQM6akjd-dQau4wfbE,19725
|
|
42
|
-
cuqi/experimental/geometry/__init__.py,sha256=kgoKegfz3Jhr7fpORB_l55z9zLZRtloTLyXFDh1oF2o,47
|
|
43
|
-
cuqi/experimental/geometry/_productgeometry.py,sha256=G-hIYnfLiRS5IWD2EPXORNBKNP2zSaCCHAeBlDC_R3I,7177
|
|
44
|
-
cuqi/experimental/mcmc/__init__.py,sha256=zSqLZmxOqQ-F94C9-gPv7g89TX1XxlrlNm071Eb167I,4487
|
|
45
|
-
cuqi/experimental/mcmc/_conjugate.py,sha256=yyN5ZKcz8xuWDa7wGJLAcx8xN_XpE_Hvg0DzcJTG9-g,19488
|
|
46
|
-
cuqi/experimental/mcmc/_conjugate_approx.py,sha256=jmxe2FEbO9fwpc8opyjJ2px0oed3dGyj0qDwyHo4aOk,3545
|
|
47
|
-
cuqi/experimental/mcmc/_cwmh.py,sha256=50v3uZaWhlVnfrEB5-lB_7pn8QoUVBe-xWxKGKbmNHg,7234
|
|
48
|
-
cuqi/experimental/mcmc/_direct.py,sha256=9pQS_2Qk2-ybt6m8WTfPoKetcxQ00WaTRN85-Z0FrBY,777
|
|
49
|
-
cuqi/experimental/mcmc/_gibbs.py,sha256=evgxf2tLFLlKB3hN0qz9a9NcZQSES8wdacnn3uNWocQ,12005
|
|
50
|
-
cuqi/experimental/mcmc/_hmc.py,sha256=8p4QxZBRpFLzwamH-DWHSdZE0aXX3FqonBzczz_XkDw,19340
|
|
51
|
-
cuqi/experimental/mcmc/_langevin_algorithm.py,sha256=NIoCLKL5x89Bxm-JLDLR_NTunREfUohospmIGsGUgJA,14619
|
|
52
|
-
cuqi/experimental/mcmc/_laplace_approximation.py,sha256=XcGIa2wl9nCSTtAFurejYYOKkDVAJ22q75xQKsyu2nI,5803
|
|
53
|
-
cuqi/experimental/mcmc/_mh.py,sha256=MXo0ahXP4KGFkaY4HtvcBE-TMQzsMlTmLKzSvpz7drU,2941
|
|
54
|
-
cuqi/experimental/mcmc/_pcn.py,sha256=wqJBZLuRFSwxihaI53tumAg6AWVuceLMOmXssTetd1A,3374
|
|
55
|
-
cuqi/experimental/mcmc/_rto.py,sha256=pnhgBR63A_OboHto-I9_o-GsY5yZaH3wbU8S6eXLXX0,13931
|
|
56
|
-
cuqi/experimental/mcmc/_sampler.py,sha256=BZHnpB6s-YSddd46wQSds0vNF61RA58Nc9ZU05WngdU,20184
|
|
57
|
-
cuqi/experimental/mcmc/_utilities.py,sha256=kUzHbhIS3HYZRbneNBK41IogUYX5dS_bJxqEGm7TQBI,525
|
|
58
|
-
cuqi/geometry/__init__.py,sha256=Tz1WGzZBY-QGH3c0GiyKm9XHN8MGGcnU6TUHLZkzB3o,842
|
|
59
|
-
cuqi/geometry/_geometry.py,sha256=tsWMca6E-KEXwr_LhjwP7Lsdi5TWCyu0T956Cj5LEXQ,47091
|
|
60
|
-
cuqi/implicitprior/__init__.py,sha256=6z3lvw-tWDyjZSpB3pYzvijSMK9Zlf1IYqOVTtMD2h4,309
|
|
61
|
-
cuqi/implicitprior/_regularizedGMRF.py,sha256=BUeT4rwJzary9K56fkxCNGCeKZd-2VSgOT8XNHxFPRE,6345
|
|
62
|
-
cuqi/implicitprior/_regularizedGaussian.py,sha256=whTitoB5ZvWg8jm7ipugR_1ouK1M2EGrfwAnr46xDnE,19395
|
|
63
|
-
cuqi/implicitprior/_regularizedUnboundedUniform.py,sha256=uHGYYnTjVxdPbY-5JwocFOH0sHRfGrrLiHWahzH9R8A,3533
|
|
64
|
-
cuqi/implicitprior/_restorator.py,sha256=Z350XUJEt7N59Qw-SIUaBljQNDJk4Zb0i_KRFrt2DCg,10087
|
|
65
|
-
cuqi/likelihood/__init__.py,sha256=QXif382iwZ5bT3ZUqmMs_n70JVbbjxbqMrlQYbMn4Zo,1776
|
|
66
|
-
cuqi/likelihood/_likelihood.py,sha256=PuW8ufRefLt6w40JQWqNnEh3YCLxu4pz0h0PcpT8inc,7075
|
|
67
|
-
cuqi/model/__init__.py,sha256=jgY2-jyxEMC79vkyH9BpfowW7_DbMRjqedOtO5fykXQ,62
|
|
68
|
-
cuqi/model/_model.py,sha256=LqeMwOSb1oIGpT7g1cmItP_2Q4dmgg8eNPNo0joPUyg,32905
|
|
69
|
-
cuqi/operator/__init__.py,sha256=0pc9p-KPyl7KtPV0noB0ddI0CP2iYEHw5rbw49D8Njk,136
|
|
70
|
-
cuqi/operator/_operator.py,sha256=yNwPTh7jR07AiKMbMQQ5_54EgirlKFsbq9JN1EODaQI,8856
|
|
71
|
-
cuqi/pde/__init__.py,sha256=NyS_ZYruCvy-Yg24qKlwm3ZIX058kLNQX9bqs-xg4ZM,99
|
|
72
|
-
cuqi/pde/_pde.py,sha256=WRkOYyIdT_T3aZepRh0aS9C5nBbUZUcHaA80iSRvgoo,12572
|
|
73
|
-
cuqi/problem/__init__.py,sha256=JxJty4JqHTOqSG6NeTGiXRQ7OLxiRK9jvVq3lXLeIRw,38
|
|
74
|
-
cuqi/problem/_problem.py,sha256=31ByO279-6hM8PhWjwD5k7i9aBAkk9S1tcgMzxv1PiQ,38256
|
|
75
|
-
cuqi/sampler/__init__.py,sha256=D-dYa0gFgIwQukP8_VKhPGmlGKXbvVo7YqaET4SdAeQ,382
|
|
76
|
-
cuqi/sampler/_conjugate.py,sha256=x5OsFk1zDm2tvoFsSxbCKwjSqBHUGbcUvcTwDOvL-tw,2841
|
|
77
|
-
cuqi/sampler/_conjugate_approx.py,sha256=xX-X71EgxGnZooOY6CIBhuJTs3dhcKfoLnoFxX3CO2g,1938
|
|
78
|
-
cuqi/sampler/_cwmh.py,sha256=VlAVT1SXQU0yD5ZeR-_ckWvX-ifJrMweFFdFbxdfB_k,7775
|
|
79
|
-
cuqi/sampler/_gibbs.py,sha256=N7qcePwMkRtxINN5JF0FaMIdDCXZGqsfKjfha_KHCck,8627
|
|
80
|
-
cuqi/sampler/_hmc.py,sha256=EUTefZir-wapoZ7OZFb5M5vayL8z6XksZRMY1BpbuXc,15027
|
|
81
|
-
cuqi/sampler/_langevin_algorithm.py,sha256=o5EyvaR6QGAD7LKwXVRC3WwAP5IYJf5GoMVWl9DrfOA,7861
|
|
82
|
-
cuqi/sampler/_laplace_approximation.py,sha256=M0SnpICcf8No1zsPKopGEncVgLqBUI7VUDf9-YIkk_g,6565
|
|
83
|
-
cuqi/sampler/_mh.py,sha256=V5tIdn-KdfWo4J_Nbf-AH6XwKWblWUyc4BeuSikUHsE,7062
|
|
84
|
-
cuqi/sampler/_pcn.py,sha256=F0h9-nUFtkqn-o-1s8BCsmr8V7u6R7ycoCOeeV1uhj0,8601
|
|
85
|
-
cuqi/sampler/_rto.py,sha256=KIs0cDEoYK5I35RwO9fr5eKWeINLsmTLSVBnLdZmzzM,11921
|
|
86
|
-
cuqi/sampler/_sampler.py,sha256=TkZ_WAS-5Q43oICa-Elc2gftsRTBd7PEDUMDZ9tTGmU,5712
|
|
87
|
-
cuqi/samples/__init__.py,sha256=vCs6lVk-pi8RBqa6cIN5wyn6u-K9oEf1Na4k1ZMrYv8,44
|
|
88
|
-
cuqi/samples/_samples.py,sha256=hUc8OnCF9CTCuDTrGHwwzv3wp8mG_6vsJAFvuQ-x0uA,35832
|
|
89
|
-
cuqi/solver/__init__.py,sha256=KYgAi_8VoAwljTB3S2I87YnJkRtedskLee7hQp_-zp8,220
|
|
90
|
-
cuqi/solver/_solver.py,sha256=_Q47Atv8Ze6eMJzA22s0OzdW4lcDigRhbotnCzmrQWE,30662
|
|
91
|
-
cuqi/testproblem/__init__.py,sha256=DWTOcyuNHMbhEuuWlY5CkYkNDSAqhvsKmJXBLivyblU,202
|
|
92
|
-
cuqi/testproblem/_testproblem.py,sha256=x769LwwRdJdzIiZkcQUGb_5-vynNTNALXWKato7sS0Q,52540
|
|
93
|
-
cuqi/utilities/__init__.py,sha256=RB84VstmFcZgPOz58LKSzOvCVebbeKDcKl9MGk-EwoA,515
|
|
94
|
-
cuqi/utilities/_get_python_variable_name.py,sha256=wxpCaj9f3ZtBNqlGmmuGiITgBaTsY-r94lUIlK6UAU4,2043
|
|
95
|
-
cuqi/utilities/_utilities.py,sha256=gc9YAj7wFKzyZTE1H5iI_1Tt4AtjT1g5l1-zxBdH-Co,15281
|
|
96
|
-
CUQIpy-1.3.0.dist-info/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
|
|
97
|
-
CUQIpy-1.3.0.dist-info/METADATA,sha256=H6xr0TNH9PhCjZ98sJ_uriRllUC_E6XbS_2qkcDxkoE,18516
|
|
98
|
-
CUQIpy-1.3.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
99
|
-
CUQIpy-1.3.0.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
|
|
100
|
-
CUQIpy-1.3.0.dist-info/RECORD,,
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Re-implementation of sampler module in a more object-oriented way.
|
|
3
|
-
|
|
4
|
-
Main changes for users
|
|
5
|
-
----------------------
|
|
6
|
-
|
|
7
|
-
1. Sampling API
|
|
8
|
-
^^^^^^^^^^^^
|
|
9
|
-
|
|
10
|
-
Previously one would call the `.sample` or `sample_adapt` methods of a sampler instance at :py:mod:`cuqi.sampler` to sample from a target distribution and store the samples as the output as follows:
|
|
11
|
-
|
|
12
|
-
.. code-block:: python
|
|
13
|
-
|
|
14
|
-
from cuqi.sampler import MH
|
|
15
|
-
from cuqi.distribution import DistributionGallery
|
|
16
|
-
|
|
17
|
-
# Target distribution
|
|
18
|
-
target = DistributionGallery("donut")
|
|
19
|
-
|
|
20
|
-
# Set up sampler
|
|
21
|
-
sampler = MH(target)
|
|
22
|
-
|
|
23
|
-
# Sample from the target distribution (Alternatively calling sample with explicit scale parameter set in sampler)
|
|
24
|
-
samples = sampler.sample_adapt(Ns=100, Nb=100) # Burn-in (Nb) removed by default
|
|
25
|
-
|
|
26
|
-
This has now changed to to a more object-oriented API which provides more flexibility and control over the sampling process.
|
|
27
|
-
|
|
28
|
-
For example one can now more explicitly control when the sampler is tuned (warmup) and when it is sampling with fixed parameters.
|
|
29
|
-
|
|
30
|
-
.. code-block:: python
|
|
31
|
-
|
|
32
|
-
from cuqi.experimental.mcmc import MH
|
|
33
|
-
from cuqi.distribution import DistributionGallery
|
|
34
|
-
|
|
35
|
-
# Target distribution
|
|
36
|
-
target = DistributionGallery("donut")
|
|
37
|
-
|
|
38
|
-
# Set up sampler
|
|
39
|
-
sampler = MH(target)
|
|
40
|
-
|
|
41
|
-
# Sample from the target distribution
|
|
42
|
-
sampler.warmup(Nb=100) # Explicit warmup (tuning) of sampler
|
|
43
|
-
sampler.sample(Ns=100) # Sampling with fixed parameters
|
|
44
|
-
samples = sampler.get_samples().burnthin(Nb=100) # Getting samples and removing burn-in from warmup
|
|
45
|
-
|
|
46
|
-
Importantly, the removal of burn-in from e.g. warmup is now a separate step that is done after the sampling process is complete.
|
|
47
|
-
|
|
48
|
-
2. Sampling API for BayesianProblem
|
|
49
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
50
|
-
|
|
51
|
-
:py:class:`cuqi.problem.BayesianProblem` continues to have the same API for `sample_posterior` and the `UQ` method.
|
|
52
|
-
|
|
53
|
-
There is now a flag `experimental` that can be set to `True` to use the new MCMC samplers.
|
|
54
|
-
|
|
55
|
-
By default, the flag is set to `False` and the old samplers are used.
|
|
56
|
-
|
|
57
|
-
For this more high-level interface, burn-in is automatically removed from the samples as was the case before.
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
3. More options for Gibbs sampling
|
|
61
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
62
|
-
|
|
63
|
-
There are now more options for Gibbs sampling. Previously it was only possible to sample with Gibbs for samplers :py:class:`cuqi.sampler.LinearRTO`, :py:class:`cuqi.sampler.RegularizedLinearRTO`, :py:class:`cuqi.sampler.Conjugate`, and :py:class:`cuqi.sampler.ConjugateApprox`.
|
|
64
|
-
|
|
65
|
-
Now, it is possible to define a Gibbs sampling scheme using any sampler from the :py:mod:`cuqi.experimental.mcmc` module.
|
|
66
|
-
|
|
67
|
-
**Example using a NUTS-within-Gibbs scheme for a 1D deconvolution problem:**
|
|
68
|
-
|
|
69
|
-
.. code-block:: python
|
|
70
|
-
|
|
71
|
-
import cuqi
|
|
72
|
-
import numpy as np
|
|
73
|
-
from cuqi.distribution import Gamma, Gaussian, GMRF, JointDistribution
|
|
74
|
-
from cuqi.experimental.mcmc import NUTS, HybridGibbs, Conjugate
|
|
75
|
-
from cuqi.testproblem import Deconvolution1D
|
|
76
|
-
|
|
77
|
-
# Forward problem
|
|
78
|
-
A, y_data, info = Deconvolution1D(dim=128, phantom='sinc', noise_std=0.001).get_components()
|
|
79
|
-
|
|
80
|
-
# Bayesian Inverse Problem
|
|
81
|
-
s = Gamma(1, 1e-4)
|
|
82
|
-
x = GMRF(np.zeros(A.domain_dim), 50)
|
|
83
|
-
y = Gaussian(A @ x, lambda s: 1 / s)
|
|
84
|
-
|
|
85
|
-
# Posterior
|
|
86
|
-
target = JointDistribution(y, x, s)(y=y_data)
|
|
87
|
-
|
|
88
|
-
# Gibbs sampling strategy. Note we can define initial_points and various parameters for each sampler
|
|
89
|
-
sampling_strategy = {
|
|
90
|
-
"x": NUTS(max_depth=10, initial_point=np.zeros(A.domain_dim)),
|
|
91
|
-
"s": Conjugate()
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
# Here we do 10 internal steps with NUTS for each Gibbs step
|
|
95
|
-
num_sampling_steps = {
|
|
96
|
-
"x": 10,
|
|
97
|
-
"s": 1
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
sampler = HybridGibbs(target, sampling_strategy, num_sampling_steps)
|
|
101
|
-
|
|
102
|
-
sampler.warmup(50)
|
|
103
|
-
sampler.sample(200)
|
|
104
|
-
samples = sampler.get_samples().burnthin(Nb=50)
|
|
105
|
-
|
|
106
|
-
samples["x"].plot_ci(exact=info.exactSolution)
|
|
107
|
-
"""
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
from ._sampler import Sampler, ProposalBasedSampler
|
|
112
|
-
from ._langevin_algorithm import ULA, MALA, MYULA, PnPULA
|
|
113
|
-
from ._mh import MH
|
|
114
|
-
from ._pcn import PCN
|
|
115
|
-
from ._rto import LinearRTO, RegularizedLinearRTO
|
|
116
|
-
from ._cwmh import CWMH
|
|
117
|
-
from ._laplace_approximation import UGLA
|
|
118
|
-
from ._hmc import NUTS
|
|
119
|
-
from ._gibbs import HybridGibbs
|
|
120
|
-
from ._conjugate import Conjugate
|
|
121
|
-
from ._conjugate_approx import ConjugateApprox
|
|
122
|
-
from ._direct import Direct
|
|
123
|
-
from ._utilities import find_valid_samplers
|