CUQIpy 1.3.0.post0.dev266__tar.gz → 1.3.0.post0.dev277__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.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/CUQIpy.egg-info/PKG-INFO +1 -1
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/PKG-INFO +1 -1
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/_version.py +3 -3
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_gibbs.py +28 -2
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_implicit_priors.py +3 -3
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/CUQIpy.egg-info/SOURCES.txt +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/CUQIpy.egg-info/dependency_links.txt +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/CUQIpy.egg-info/requires.txt +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/CUQIpy.egg-info/top_level.txt +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/LICENSE +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/README.md +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/_messages.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/array/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/array/_array.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/config.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/_data.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/astronaut.npz +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/camera.npz +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/cat.npz +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/cookie.png +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/data/satellite.mat +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/density/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/density/_density.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/diagnostics.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_beta.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_cauchy.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_cmrf.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_custom.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_distribution.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_gamma.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_gaussian.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_gmrf.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_inverse_gamma.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_joint_distribution.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_laplace.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_lmrf.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_lognormal.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_modifiedhalfnormal.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_normal.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_posterior.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_smoothed_laplace.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_truncated_normal.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_uniform.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/_recommender.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/_ast.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/_orderedset.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/_randomvariable.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/geometry/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/geometry/_productgeometry.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_conjugate.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_conjugate_approx.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_cwmh.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_direct.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_hmc.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_langevin_algorithm.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_laplace_approximation.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_mh.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_pcn.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_rto.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_sampler.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/geometry/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/geometry/_geometry.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/implicitprior/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/implicitprior/_regularizedGMRF.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/implicitprior/_regularizedGaussian.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/implicitprior/_regularizedUnboundedUniform.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/implicitprior/_restorator.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/likelihood/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/likelihood/_likelihood.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/model/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/model/_model.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/operator/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/operator/_operator.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/pde/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/pde/_pde.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/problem/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/problem/_problem.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_conjugate.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_conjugate_approx.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_cwmh.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_gibbs.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_hmc.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_langevin_algorithm.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_laplace_approximation.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_mh.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_pcn.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_rto.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/sampler/_sampler.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/samples/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/samples/_samples.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/solver/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/solver/_solver.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/testproblem/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/testproblem/_testproblem.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/utilities/__init__.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/utilities/_get_python_variable_name.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/utilities/_utilities.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/pyproject.toml +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/requirements.txt +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/setup.cfg +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/setup.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_MRFs.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_abstract_distribution_density.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_bayesian_inversion.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_density.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_distribution.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_distributions_shape.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_geometry.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_joint_distribution.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_likelihood.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_model.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_pde.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_posterior.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_problem.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_sampler.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_samples.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_solver.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_testproblem.py +0 -0
- {cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/tests/test_utilities.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.3.0.post0.
|
|
3
|
+
Version: 1.3.0.post0.dev277
|
|
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.4
|
|
2
2
|
Name: CUQIpy
|
|
3
|
-
Version: 1.3.0.post0.
|
|
3
|
+
Version: 1.3.0.post0.dev277
|
|
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-06-
|
|
11
|
+
"date": "2025-06-26T10:10:00+0300",
|
|
12
12
|
"dirty": false,
|
|
13
13
|
"error": null,
|
|
14
|
-
"full-revisionid": "
|
|
15
|
-
"version": "1.3.0.post0.
|
|
14
|
+
"full-revisionid": "52c8f8ffc38956c4aee969ccc70cd3db24ee774e",
|
|
15
|
+
"version": "1.3.0.post0.dev277"
|
|
16
16
|
}
|
|
17
17
|
''' # END VERSION_JSON
|
|
18
18
|
|
|
@@ -42,6 +42,10 @@ class HybridGibbs:
|
|
|
42
42
|
fully stateful at this point. This means samplers like NUTS will lose
|
|
43
43
|
their internal state between Gibbs steps.
|
|
44
44
|
|
|
45
|
+
The order in which the conditionals are sampled is the order of the
|
|
46
|
+
variables in the sampling strategy, unless a different sampling order
|
|
47
|
+
is specified by the parameter `scan_order`
|
|
48
|
+
|
|
45
49
|
Parameters
|
|
46
50
|
----------
|
|
47
51
|
target : cuqi.distribution.JointDistribution
|
|
@@ -58,6 +62,11 @@ class HybridGibbs:
|
|
|
58
62
|
will call its step method in each Gibbs step.
|
|
59
63
|
Default is 1 for all variables.
|
|
60
64
|
|
|
65
|
+
scan_order : list or str, *optional*
|
|
66
|
+
Order in which the conditional distributions are sampled.
|
|
67
|
+
If set to "random", use a random ordering at each step.
|
|
68
|
+
If not specified, it will be the order in the sampling_strategy.
|
|
69
|
+
|
|
61
70
|
callback : callable, optional
|
|
62
71
|
A function that will be called after each sampling step. It can be useful for monitoring the sampler during sampling.
|
|
63
72
|
The function should take three arguments: the sampler object, the index of the current sampling step, the total number of requested samples. The last two arguments are integers. An example of the callback function signature is: `callback(sampler, sample_index, num_of_samples)`.
|
|
@@ -107,7 +116,7 @@ class HybridGibbs:
|
|
|
107
116
|
|
|
108
117
|
"""
|
|
109
118
|
|
|
110
|
-
def __init__(self, target: JointDistribution, sampling_strategy: Dict[str, Sampler], num_sampling_steps: Dict[str, int] = None, callback=None):
|
|
119
|
+
def __init__(self, target: JointDistribution, sampling_strategy: Dict[str, Sampler], num_sampling_steps: Dict[str, int] = None, scan_order = None, callback=None):
|
|
111
120
|
|
|
112
121
|
# Store target and allow conditioning to reduce to a single density
|
|
113
122
|
self.target = target() # Create a copy of target distribution (to avoid modifying the original)
|
|
@@ -121,6 +130,13 @@ class HybridGibbs:
|
|
|
121
130
|
# Store parameter names
|
|
122
131
|
self.par_names = self.target.get_parameter_names()
|
|
123
132
|
|
|
133
|
+
# Store the scan order
|
|
134
|
+
self._scan_order = scan_order
|
|
135
|
+
|
|
136
|
+
# Check that the parameters of the target align with the sampling_strategy and scan_order
|
|
137
|
+
if set(self.par_names) != set(self.scan_order):
|
|
138
|
+
raise ValueError("Parameter names in JointDistribution do not equal the names in the scan order.")
|
|
139
|
+
|
|
124
140
|
# Initialize sampler (after target is set)
|
|
125
141
|
self._initialize()
|
|
126
142
|
|
|
@@ -148,6 +164,16 @@ class HybridGibbs:
|
|
|
148
164
|
# Validate all targets for samplers.
|
|
149
165
|
self.validate_targets()
|
|
150
166
|
|
|
167
|
+
@property
|
|
168
|
+
def scan_order(self):
|
|
169
|
+
if self._scan_order is None:
|
|
170
|
+
return list(self.samplers.keys())
|
|
171
|
+
if self._scan_order == "random":
|
|
172
|
+
arr = list(self.samplers.keys())
|
|
173
|
+
np.random.shuffle(arr) # Shuffle works in-place
|
|
174
|
+
return arr
|
|
175
|
+
return self._scan_order
|
|
176
|
+
|
|
151
177
|
# ------------ Public methods ------------
|
|
152
178
|
def validate_targets(self):
|
|
153
179
|
""" Validate each of the conditional targets used in the Gibbs steps """
|
|
@@ -217,7 +243,7 @@ class HybridGibbs:
|
|
|
217
243
|
""" Sequentially go through all parameters and sample them conditionally on each other """
|
|
218
244
|
|
|
219
245
|
# Sample from each conditional distribution
|
|
220
|
-
for par_name in self.
|
|
246
|
+
for par_name in self.scan_order:
|
|
221
247
|
|
|
222
248
|
# Set target for current parameter
|
|
223
249
|
self._set_target(par_name)
|
|
@@ -210,8 +210,8 @@ def test_regression_increasing():
|
|
|
210
210
|
posterior = joint(y=y_obs)
|
|
211
211
|
|
|
212
212
|
sampling_strategy = {
|
|
213
|
+
'd': cuqi.experimental.mcmc.Conjugate(),
|
|
213
214
|
'x': cuqi.experimental.mcmc.RegularizedLinearRTO(maxit=50, penalty_parameter=20, adaptive = False),
|
|
214
|
-
'd': cuqi.experimental.mcmc.Conjugate()
|
|
215
215
|
}
|
|
216
216
|
sampler = cuqi.experimental.mcmc.HybridGibbs(posterior, sampling_strategy)
|
|
217
217
|
|
|
@@ -241,8 +241,8 @@ def test_regression_convex():
|
|
|
241
241
|
posterior = joint(y=y_obs)
|
|
242
242
|
|
|
243
243
|
sampling_strategy = {
|
|
244
|
-
'
|
|
245
|
-
'
|
|
244
|
+
'd': cuqi.experimental.mcmc.Conjugate(),
|
|
245
|
+
'x': cuqi.experimental.mcmc.RegularizedLinearRTO(maxit=50, penalty_parameter=20, adaptive = False)
|
|
246
246
|
}
|
|
247
247
|
sampler = cuqi.experimental.mcmc.HybridGibbs(posterior, sampling_strategy)
|
|
248
248
|
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/CUQIpy.egg-info/dependency_links.txt
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
|
|
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.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_joint_distribution.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_modifiedhalfnormal.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_smoothed_laplace.py
RENAMED
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/distribution/_truncated_normal.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/_orderedset.py
RENAMED
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/algebra/_randomvariable.py
RENAMED
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/geometry/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/experimental/mcmc/_conjugate.py
RENAMED
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/cuqi/implicitprior/_regularizedGMRF.py
RENAMED
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/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
|
|
File without changes
|
{cuqipy-1.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/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.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/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.3.0.post0.dev266 → cuqipy-1.3.0.post0.dev277}/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
|