CUQIpy 1.3.0.post0.dev298__py3-none-any.whl → 1.4.0.post0.dev92__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.
Files changed (68) hide show
  1. cuqi/__init__.py +2 -0
  2. cuqi/_version.py +3 -3
  3. cuqi/algebra/__init__.py +2 -0
  4. cuqi/{experimental/algebra/_randomvariable.py → algebra/_random_variable.py} +4 -4
  5. cuqi/density/_density.py +9 -1
  6. cuqi/distribution/_distribution.py +25 -16
  7. cuqi/distribution/_joint_distribution.py +99 -14
  8. cuqi/distribution/_posterior.py +9 -0
  9. cuqi/experimental/__init__.py +1 -4
  10. cuqi/experimental/_recommender.py +4 -4
  11. cuqi/geometry/__init__.py +2 -0
  12. cuqi/{experimental/geometry/_productgeometry.py → geometry/_product_geometry.py} +1 -1
  13. cuqi/implicitprior/__init__.py +1 -1
  14. cuqi/implicitprior/_restorator.py +35 -1
  15. cuqi/legacy/__init__.py +2 -0
  16. cuqi/legacy/sampler/__init__.py +11 -0
  17. cuqi/legacy/sampler/_conjugate.py +55 -0
  18. cuqi/legacy/sampler/_conjugate_approx.py +52 -0
  19. cuqi/legacy/sampler/_cwmh.py +196 -0
  20. cuqi/legacy/sampler/_gibbs.py +231 -0
  21. cuqi/legacy/sampler/_hmc.py +335 -0
  22. cuqi/legacy/sampler/_langevin_algorithm.py +198 -0
  23. cuqi/legacy/sampler/_laplace_approximation.py +184 -0
  24. cuqi/legacy/sampler/_mh.py +190 -0
  25. cuqi/legacy/sampler/_pcn.py +244 -0
  26. cuqi/legacy/sampler/_rto.py +284 -0
  27. cuqi/legacy/sampler/_sampler.py +182 -0
  28. cuqi/likelihood/_likelihood.py +1 -1
  29. cuqi/model/_model.py +225 -90
  30. cuqi/pde/__init__.py +4 -0
  31. cuqi/pde/_observation_map.py +36 -0
  32. cuqi/pde/_pde.py +52 -21
  33. cuqi/problem/_problem.py +87 -80
  34. cuqi/sampler/__init__.py +120 -8
  35. cuqi/sampler/_conjugate.py +376 -35
  36. cuqi/sampler/_conjugate_approx.py +40 -16
  37. cuqi/sampler/_cwmh.py +132 -138
  38. cuqi/{experimental/mcmc → sampler}/_direct.py +1 -1
  39. cuqi/sampler/_gibbs.py +276 -130
  40. cuqi/sampler/_hmc.py +328 -201
  41. cuqi/sampler/_langevin_algorithm.py +282 -98
  42. cuqi/sampler/_laplace_approximation.py +87 -117
  43. cuqi/sampler/_mh.py +47 -157
  44. cuqi/sampler/_pcn.py +65 -213
  45. cuqi/sampler/_rto.py +206 -140
  46. cuqi/sampler/_sampler.py +540 -135
  47. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev92.dist-info}/METADATA +1 -1
  48. cuqipy-1.4.0.post0.dev92.dist-info/RECORD +101 -0
  49. cuqi/experimental/algebra/__init__.py +0 -2
  50. cuqi/experimental/geometry/__init__.py +0 -1
  51. cuqi/experimental/mcmc/__init__.py +0 -122
  52. cuqi/experimental/mcmc/_conjugate.py +0 -396
  53. cuqi/experimental/mcmc/_conjugate_approx.py +0 -76
  54. cuqi/experimental/mcmc/_cwmh.py +0 -190
  55. cuqi/experimental/mcmc/_gibbs.py +0 -374
  56. cuqi/experimental/mcmc/_hmc.py +0 -460
  57. cuqi/experimental/mcmc/_langevin_algorithm.py +0 -382
  58. cuqi/experimental/mcmc/_laplace_approximation.py +0 -154
  59. cuqi/experimental/mcmc/_mh.py +0 -80
  60. cuqi/experimental/mcmc/_pcn.py +0 -89
  61. cuqi/experimental/mcmc/_rto.py +0 -306
  62. cuqi/experimental/mcmc/_sampler.py +0 -564
  63. cuqipy-1.3.0.post0.dev298.dist-info/RECORD +0 -100
  64. /cuqi/{experimental/algebra/_ast.py → algebra/_abstract_syntax_tree.py} +0 -0
  65. /cuqi/{experimental/algebra/_orderedset.py → algebra/_ordered_set.py} +0 -0
  66. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev92.dist-info}/WHEEL +0 -0
  67. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev92.dist-info}/licenses/LICENSE +0 -0
  68. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev92.dist-info}/top_level.txt +0 -0
@@ -1,564 +0,0 @@
1
- from abc import ABC, abstractmethod
2
- import os
3
- import numpy as np
4
- import pickle as pkl
5
- import warnings
6
- import cuqi
7
- from cuqi.samples import Samples
8
-
9
- try:
10
- from tqdm import tqdm
11
- except ImportError:
12
- def tqdm(iterable, **kwargs):
13
- warnings.warn("Module mcmc: tqdm not found. Install tqdm to get sampling progress.")
14
- return iterable
15
-
16
- class Sampler(ABC):
17
- """ Abstract base class for all samplers.
18
-
19
- Provides a common interface for all samplers. The interface includes methods for sampling, warmup and getting the samples in an object oriented way.
20
-
21
- Samples are stored in a list to allow for dynamic growth of the sample set. Returning samples is done by creating a new Samples object from the list of samples.
22
-
23
- The sampler maintains sets of state and history keys, which are used for features like checkpointing and resuming sampling.
24
-
25
- The state of the sampler represents all variables that are updated (replaced) in a Markov Monte Carlo step, e.g. the current point of the sampler.
26
-
27
- The history of the sampler represents all variables that are updated (appended) in a Markov Monte Carlo step, e.g. the samples and acceptance rates.
28
-
29
- Subclasses should ensure that any new variables that are updated in a Markov Monte Carlo step are added to the state or history keys.
30
-
31
- Saving and loading checkpoints saves and loads the state of the sampler (not the history).
32
-
33
- Batching samples via the batch_size parameter saves the sampler history to disk in batches of the specified size.
34
-
35
- Any other attribute stored as part of the sampler (e.g. target, initial_point) is not supposed to be updated
36
- during sampling and should not be part of the state or history.
37
-
38
- """
39
-
40
- _STATE_KEYS = {'current_point'}
41
- """ Set of keys for the state dictionary. """
42
-
43
- _HISTORY_KEYS = {'_samples', '_acc'}
44
- """ Set of keys for the history dictionary. """
45
-
46
- def __init__(self, target:cuqi.density.Density=None, initial_point=None, callback=None):
47
- """ Initializer for abstract base class for all samplers.
48
-
49
- Any subclassing samplers should simply store input parameters as part of the __init__ method.
50
-
51
- The actual initialization of the sampler should be done in the _initialize method.
52
-
53
- Parameters
54
- ----------
55
- target : cuqi.density.Density
56
- The target density.
57
-
58
- initial_point : array-like, optional
59
- The initial point for the sampler. If not given, the sampler will choose an initial point.
60
-
61
- callback : callable, optional
62
- A function that will be called after each sampling step. It can be useful for monitoring the sampler during sampling.
63
- 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)`.
64
- """
65
-
66
- self.target = target
67
- self.initial_point = initial_point
68
- self.callback = callback
69
- self._is_initialized = False
70
-
71
- def initialize(self):
72
- """ Initialize the sampler by setting and allocating the state and history before sampling starts. """
73
-
74
- if self._is_initialized:
75
- raise ValueError("Sampler is already initialized.")
76
-
77
- if self.target is None:
78
- raise ValueError("Cannot initialize sampler without a target density.")
79
-
80
- # Default values
81
- if self.initial_point is None:
82
- self.initial_point = self._get_default_initial_point(self.dim)
83
-
84
- # State variables
85
- self.current_point = self.initial_point
86
-
87
- # History variables
88
- self._samples = []
89
- self._acc = [ 1 ] # TODO. Check if we need to put 1 here.
90
-
91
- self._initialize() # Subclass specific initialization
92
-
93
- self._validate_initialization()
94
-
95
- self._is_initialized = True
96
-
97
- # ------------ Abstract methods to be implemented by subclasses ------------
98
- @abstractmethod
99
- def step(self):
100
- """ Perform one step of the sampler by transitioning the current point to a new point according to the sampler's transition kernel. """
101
- pass
102
-
103
- @abstractmethod
104
- def tune(self, skip_len, update_count):
105
- """ Tune the parameters of the sampler. This method is called after each step of the warmup phase.
106
-
107
- Parameters
108
- ----------
109
- skip_len : int
110
- Defines the number of steps in between tuning (i.e. the tuning interval).
111
-
112
- update_count : int
113
- The number of times tuning has been performed. Can be used for internal bookkeeping.
114
-
115
- """
116
- pass
117
-
118
- @abstractmethod
119
- def validate_target(self):
120
- """ Validate the target is compatible with the sampler. Called when the target is set. Should raise an error if the target is not compatible. """
121
- pass
122
-
123
- @abstractmethod
124
- def _initialize(self):
125
- """ Subclass specific sampler initialization. Called during the initialization of the sampler which is done before sampling starts. """
126
- pass
127
-
128
- # ------------ Public attributes ------------
129
- @property
130
- def dim(self) -> int:
131
- """ Dimension of the target density. """
132
- return self.target.dim
133
-
134
- @property
135
- def geometry(self) -> cuqi.geometry.Geometry:
136
- """ Geometry of the target density. """
137
- return self.target.geometry
138
-
139
- @property
140
- def target(self) -> cuqi.density.Density:
141
- """ Return the target density. """
142
- return self._target
143
-
144
- @target.setter
145
- def target(self, value):
146
- """ Set the target density. Runs validation of the target. """
147
- self._target = value
148
- if self._target is not None:
149
- self.validate_target()
150
-
151
- # ------------ Public methods ------------
152
- def get_samples(self) -> Samples:
153
- """ Return the samples. The internal data-structure for the samples is a dynamic list so this creates a copy. """
154
- return Samples(np.array(self._samples).T, self.target.geometry)
155
-
156
- def reinitialize(self):
157
- """ Re-initialize the sampler. This clears the state and history and initializes the sampler again by setting state and history to their original values. """
158
-
159
- # Loop over state and reset to None
160
- for key in self._STATE_KEYS:
161
- setattr(self, key, None)
162
-
163
- # Loop over history and reset to None
164
- for key in self._HISTORY_KEYS:
165
- setattr(self, key, None)
166
-
167
- self._is_initialized = False
168
-
169
- self.initialize()
170
-
171
- def save_checkpoint(self, path):
172
- """ Save the state of the sampler to a file. """
173
-
174
- self._ensure_initialized()
175
-
176
- state = self.get_state()
177
-
178
- # Convert all CUQIarrays to numpy arrays since CUQIarrays do not get pickled correctly
179
- for key, value in state['state'].items():
180
- if isinstance(value, cuqi.array.CUQIarray):
181
- state['state'][key] = value.to_numpy()
182
-
183
- with open(path, 'wb') as handle:
184
- pkl.dump(state, handle, protocol=pkl.HIGHEST_PROTOCOL)
185
-
186
- def load_checkpoint(self, path):
187
- """ Load the state of the sampler from a file. """
188
-
189
- self._ensure_initialized()
190
-
191
- with open(path, 'rb') as handle:
192
- state = pkl.load(handle)
193
-
194
- self.set_state(state)
195
-
196
- def sample(self, Ns, batch_size=0, sample_path='./CUQI_samples/') -> 'Sampler':
197
- """ Sample Ns samples from the target density.
198
-
199
- Parameters
200
- ----------
201
- Ns : int
202
- The number of samples to draw.
203
-
204
- batch_size : int, optional
205
- The batch size for saving samples to disk. If 0, no batching is used. If positive, samples are saved to disk in batches of the specified size.
206
-
207
- sample_path : str, optional
208
- The path to save the samples. If not specified, the samples are saved to the current working directory under a folder called 'CUQI_samples'.
209
-
210
- """
211
- self._ensure_initialized()
212
-
213
- # Initialize batch handler
214
- if batch_size > 0:
215
- batch_handler = _BatchHandler(batch_size, sample_path)
216
-
217
- # Draw samples
218
- pbar = tqdm(range(Ns), "Sample: ")
219
- for idx in pbar:
220
-
221
- # Perform one step of the sampler
222
- acc = self.step()
223
-
224
- # Store samples
225
- self._acc.append(acc)
226
- self._samples.append(self.current_point)
227
-
228
- # display acc rate at progress bar
229
- pbar.set_postfix_str(f"acc rate: {np.mean(self._acc[-1-idx:]):.2%}")
230
-
231
- # Add sample to batch
232
- if batch_size > 0:
233
- batch_handler.add_sample(self.current_point)
234
-
235
- # Call callback function if specified
236
- self._call_callback(idx, Ns)
237
-
238
- return self
239
-
240
-
241
- def warmup(self, Nb, tune_freq=0.1) -> 'Sampler':
242
- """ Warmup the sampler by drawing Nb samples.
243
-
244
- Parameters
245
- ----------
246
- Nb : int
247
- The number of samples to draw during warmup.
248
-
249
- tune_freq : float, optional
250
- The frequency of tuning. Tuning is performed every tune_freq*Nb samples.
251
-
252
- """
253
-
254
- self._ensure_initialized()
255
-
256
- tune_interval = max(int(tune_freq * Nb), 1)
257
-
258
- # Draw warmup samples with tuning
259
- pbar = tqdm(range(Nb), "Warmup: ")
260
- for idx in pbar:
261
-
262
- # Perform one step of the sampler
263
- acc = self.step()
264
-
265
- # Tune the sampler at tuning intervals
266
- if (idx + 1) % tune_interval == 0:
267
- self.tune(tune_interval, idx // tune_interval)
268
-
269
- # Store samples
270
- self._acc.append(acc)
271
- self._samples.append(self.current_point)
272
-
273
- # display acc rate at progress bar
274
- pbar.set_postfix_str(f"acc rate: {np.mean(self._acc[-1-idx:]):.2%}")
275
-
276
- # Call callback function if specified
277
- self._call_callback(idx, Nb)
278
-
279
- return self
280
-
281
- def get_state(self) -> dict:
282
- """ Return the state of the sampler.
283
-
284
- The state is used when checkpointing the sampler.
285
-
286
- The state of the sampler is a dictionary with keys 'metadata' and 'state'.
287
- The 'metadata' key contains information about the sampler type.
288
- The 'state' key contains the state of the sampler.
289
-
290
- For example, the state of a "MH" sampler could be:
291
-
292
- state = {
293
- 'metadata': {
294
- 'sampler_type': 'MH'
295
- },
296
- 'state': {
297
- 'current_point': np.array([...]),
298
- 'current_target_logd': -123.45,
299
- 'scale': 1.0,
300
- ...
301
- }
302
- }
303
- """
304
- state = {
305
- 'metadata': {
306
- 'sampler_type': self.__class__.__name__
307
- },
308
- 'state': {
309
- key: getattr(self, key) for key in self._STATE_KEYS
310
- }
311
- }
312
- return state
313
-
314
- def set_state(self, state: dict):
315
- """ Set the state of the sampler.
316
-
317
- The state is used when loading the sampler from a checkpoint.
318
-
319
- The state of the sampler is a dictionary with keys 'metadata' and 'state'.
320
-
321
- For example, the state of a "MH" sampler could be:
322
-
323
- state = {
324
- 'metadata': {
325
- 'sampler_type': 'MH'
326
- },
327
- 'state': {
328
- 'current_point': np.array([...]),
329
- 'current_target_logd': -123.45,
330
- 'scale': 1.0,
331
- ...
332
- }
333
- }
334
- """
335
- if state['metadata']['sampler_type'] != self.__class__.__name__:
336
- raise ValueError(f"Sampler type in state dictionary ({state['metadata']['sampler_type']}) does not match the type of the sampler ({self.__class__.__name__}).")
337
-
338
- for key, value in state['state'].items():
339
- if key in self._STATE_KEYS:
340
- setattr(self, key, value)
341
- else:
342
- raise ValueError(f"Key {key} not recognized in state dictionary of sampler {self.__class__.__name__}.")
343
-
344
- def get_history(self) -> dict:
345
- """ Return the history of the sampler. """
346
- history = {
347
- 'metadata': {
348
- 'sampler_type': self.__class__.__name__
349
- },
350
- 'history': {
351
- key: getattr(self, key) for key in self._HISTORY_KEYS
352
- }
353
- }
354
- return history
355
-
356
- def set_history(self, history: dict):
357
- """ Set the history of the sampler. """
358
- if history['metadata']['sampler_type'] != self.__class__.__name__:
359
- raise ValueError(f"Sampler type in history dictionary ({history['metadata']['sampler_type']}) does not match the type of the sampler ({self.__class__.__name__}).")
360
-
361
- for key, value in history['history'].items():
362
- if key in self._HISTORY_KEYS:
363
- setattr(self, key, value)
364
- else:
365
- raise ValueError(f"Key {key} not recognized in history dictionary of sampler {self.__class__.__name__}.")
366
-
367
- # ------------ Private methods ------------
368
- def _call_callback(self, sample_index, num_of_samples):
369
- """ Calls the callback function. Assumes input is sampler, sample index, and total number of samples """
370
- if self.callback is not None:
371
- self.callback(self, sample_index, num_of_samples)
372
-
373
- def _validate_initialization(self):
374
- """ Validate the initialization of the sampler by checking all state and history keys are set. """
375
-
376
- for key in self._STATE_KEYS:
377
- if getattr(self, key) is None:
378
- raise ValueError(f"Sampler state key {key} is not set after initialization.")
379
-
380
- for key in self._HISTORY_KEYS:
381
- if getattr(self, key) is None:
382
- raise ValueError(f"Sampler history key {key} is not set after initialization.")
383
-
384
- def _ensure_initialized(self):
385
- """ Ensure the sampler is initialized. If not initialize it. """
386
- if not self._is_initialized:
387
- self.initialize()
388
-
389
- def _get_default_initial_point(self, dim):
390
- """ Return the default initial point for the sampler. Defaults to an array of ones. """
391
- return np.ones(dim)
392
-
393
- def __repr__(self):
394
- """ Return a string representation of the sampler. """
395
- if self.target is None:
396
- return f"Sampler: {self.__class__.__name__} \n Target: None"
397
- else:
398
- msg = f"Sampler: {self.__class__.__name__} \n Target: \n \t {self.target} "
399
-
400
- if self._is_initialized:
401
- state = self.get_state()
402
- msg += f"\n Current state: \n"
403
- # Sort keys alphabetically
404
- keys = sorted(state['state'].keys())
405
- # Put _ in the end
406
- keys = [key for key in keys if key[0] != '_'] + [key for key in keys if key[0] == '_']
407
- for key in keys:
408
- value = state['state'][key]
409
- msg += f"\t {key}: {value} \n"
410
- return msg
411
-
412
- class ProposalBasedSampler(Sampler, ABC):
413
- """ Abstract base class for samplers that use a proposal distribution. """
414
-
415
- _STATE_KEYS = Sampler._STATE_KEYS.union({'current_target_logd', 'scale'})
416
-
417
- def __init__(self, target=None, proposal=None, scale=1, **kwargs):
418
- """ Initializer for abstract base class for samplers that use a proposal distribution.
419
-
420
- Any subclassing samplers should simply store input parameters as part of the __init__ method.
421
-
422
- Initialization of the sampler should be done in the _initialize method.
423
-
424
- See :class:`Sampler` for additional details.
425
-
426
- Parameters
427
- ----------
428
- target : cuqi.density.Density
429
- The target density.
430
-
431
- proposal : cuqi.distribution.Distribution, optional
432
- The proposal distribution. If not specified, the default proposal is used.
433
-
434
- scale : float, optional
435
- The scale parameter for the proposal distribution.
436
-
437
- **kwargs : dict
438
- Additional keyword arguments passed to the :class:`Sampler` initializer.
439
-
440
- """
441
-
442
- super().__init__(target, **kwargs)
443
- self.proposal = proposal
444
- self.initial_scale = scale
445
-
446
- def initialize(self):
447
- """ Initialize the sampler by setting and allocating the state and history before sampling starts. """
448
-
449
- if self._is_initialized:
450
- raise ValueError("Sampler is already initialized.")
451
-
452
- if self.target is None:
453
- raise ValueError("Cannot initialize sampler without a target density.")
454
-
455
- # Default values
456
- if self.initial_point is None:
457
- self.initial_point = self._get_default_initial_point(self.dim)
458
-
459
- if self.proposal is None:
460
- self.proposal = self._default_proposal
461
-
462
- # State variables
463
- self.current_point = self.initial_point
464
- self.scale = self.initial_scale
465
-
466
- self.current_target_logd = self.target.logd(self.current_point)
467
-
468
- # History variables
469
- self._samples = []
470
- self._acc = [ 1 ] # TODO. Check if we need to put 1 here.
471
-
472
- self._initialize() # Subclass specific initialization
473
-
474
- self._validate_initialization()
475
-
476
- self._is_initialized = True
477
-
478
- @abstractmethod
479
- def validate_proposal(self):
480
- """ Validate the proposal distribution. """
481
- pass
482
-
483
- @property
484
- def _default_proposal(self):
485
- """ Return the default proposal distribution. Defaults to a Gaussian distribution with zero mean and unit variance. """
486
- return cuqi.distribution.Gaussian(np.zeros(self.dim), 1)
487
-
488
- @property
489
- def proposal(self):
490
- """ The proposal distribution. """
491
- return self._proposal
492
-
493
- @proposal.setter
494
- def proposal(self, proposal):
495
- """ Set the proposal distribution. """
496
- self._proposal = proposal
497
- if self._proposal is not None:
498
- self.validate_proposal()
499
-
500
-
501
- class _BatchHandler:
502
- """ Utility class to handle batching of samples.
503
-
504
- If a batch size is specified, this class will save samples to disk in batches of the specified size.
505
-
506
- This is useful for very large sample sets that do not fit in memory.
507
-
508
- """
509
-
510
- def __init__(self, batch_size=0, sample_path='./CUQI_samples/'):
511
-
512
- if batch_size < 0:
513
- raise ValueError("Batch size should be a non-negative integer")
514
-
515
- self.sample_path = sample_path
516
- self._batch_size = batch_size
517
- self.current_batch = []
518
- self.num_batches_dumped = 0
519
-
520
- @property
521
- def sample_path(self):
522
- """ The path to save the samples. """
523
- return self._sample_path
524
-
525
- @sample_path.setter
526
- def sample_path(self, value):
527
- if not isinstance(value, str):
528
- raise TypeError("Sample path must be a string.")
529
- normalized_path = value.rstrip('/') + '/'
530
- if not os.path.isdir(normalized_path):
531
- try:
532
- os.makedirs(normalized_path, exist_ok=True)
533
- except Exception as e:
534
- raise ValueError(f"Could not create directory at {normalized_path}: {e}")
535
- self._sample_path = normalized_path
536
-
537
- def add_sample(self, sample):
538
- """ Add a sample to the batch if batching. If the batch is full, flush the batch to disk. """
539
-
540
- if self._batch_size <= 0:
541
- return # Batching not used
542
-
543
- self.current_batch.append(sample)
544
-
545
- if len(self.current_batch) >= self._batch_size:
546
- self.flush()
547
-
548
- def flush(self):
549
- """ Flush the current batch of samples to disk. """
550
-
551
- if not self.current_batch:
552
- return # No samples to flush
553
-
554
- # Save the current batch of samples
555
- batch_samples = np.array(self.current_batch)
556
- file_path = f'{self.sample_path}batch_{self.num_batches_dumped:04d}.npz'
557
- np.savez(file_path, samples=batch_samples, batch_id=self.num_batches_dumped)
558
-
559
- self.num_batches_dumped += 1
560
- self.current_batch = [] # Clear the batch after saving
561
-
562
- def finalize(self):
563
- """ Finalize the batch handler. Flush any remaining samples to disk. """
564
- self.flush()
@@ -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=VwUmSwCl1TjQCoMN2OC86V-9oKtS3snnE0i5gC_KQao,510
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=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=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=gBWDb9Aj27m74mSsm9Jj_0mSu0pcEk9Cwdxrzybiwx8,16710
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=_ez3MmO6qpBeP6BKCUlW3IgxuF7k--A7jPGPUhtYK0g,4240
36
- cuqi/distribution/_uniform.py,sha256=fVgj_4SBav8JMc1pNAO1l_CZ9ZwdoMIpN9iQ3i9_Z0Q,3255
37
- cuqi/experimental/__init__.py,sha256=9DidfQuoFPr8DnhYzI78N2J0fT4pp-jNle0Rou1fcrM,174
38
- cuqi/experimental/_recommender.py,sha256=fSCJnlRrUZh-x8-mbVM5WhuPuh7Wmh-4bfvX5PyK_iE,7967
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/experimental/mcmc/__init__.py,sha256=hTAssTgtgLhdVZLFX7hpLJYtWmXrmfXb4bWee6ELqwE,4443
46
- cuqi/experimental/mcmc/_conjugate.py,sha256=vqucxC--pihBCUcupdcIo4ymDPPjmMKGb7OL1THjaKE,22059
47
- cuqi/experimental/mcmc/_conjugate_approx.py,sha256=jmxe2FEbO9fwpc8opyjJ2px0oed3dGyj0qDwyHo4aOk,3545
48
- cuqi/experimental/mcmc/_cwmh.py,sha256=cAvtc3tex53ZUKPMGwj2RIkHAZurpqphko8nk8_DmJs,7340
49
- cuqi/experimental/mcmc/_direct.py,sha256=9pQS_2Qk2-ybt6m8WTfPoKetcxQ00WaTRN85-Z0FrBY,777
50
- cuqi/experimental/mcmc/_gibbs.py,sha256=9Qutc60xoVTvKYRkirQhXEDiQ75mbjyxU7utblmu1C8,14567
51
- cuqi/experimental/mcmc/_hmc.py,sha256=LXXOb6cztfjraGIuTGpgf0ndc1xkkBW9v_PfNffu-NA,19438
52
- cuqi/experimental/mcmc/_langevin_algorithm.py,sha256=1UunuocpzG1h6GiYefEHFOMykEMlYady6Fmuu9CHxHQ,15059
53
- cuqi/experimental/mcmc/_laplace_approximation.py,sha256=I5ZLtU0lA34YflRbqxKi5UgJBhhHzxqUyVW5JE5-l2w,5916
54
- cuqi/experimental/mcmc/_mh.py,sha256=MXo0ahXP4KGFkaY4HtvcBE-TMQzsMlTmLKzSvpz7drU,2941
55
- cuqi/experimental/mcmc/_pcn.py,sha256=wqJBZLuRFSwxihaI53tumAg6AWVuceLMOmXssTetd1A,3374
56
- cuqi/experimental/mcmc/_rto.py,sha256=BY55Njw3-dcmjd-V1vQ58CisEDllQ8zaEj92pWB6LCM,15158
57
- cuqi/experimental/mcmc/_sampler.py,sha256=VK-VsPRaYET43C5quhu2f1OstEX5DKYKVyjKABTRHZE,20288
58
- cuqi/geometry/__init__.py,sha256=Tz1WGzZBY-QGH3c0GiyKm9XHN8MGGcnU6TUHLZkzB3o,842
59
- cuqi/geometry/_geometry.py,sha256=W-oQTZPelVS7fN9qZj6bNBuh-yY0eqOHJ39UwB-WmQY,47562
60
- cuqi/implicitprior/__init__.py,sha256=6z3lvw-tWDyjZSpB3pYzvijSMK9Zlf1IYqOVTtMD2h4,309
61
- cuqi/implicitprior/_regularizedGMRF.py,sha256=BUeT4rwJzary9K56fkxCNGCeKZd-2VSgOT8XNHxFPRE,6345
62
- cuqi/implicitprior/_regularizedGaussian.py,sha256=9BSKHGEW0OT9OIt_42strDzxBM8mB6A-blcf0kEguHw,21836
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=Y7rMoJzw0FYJiP9pCH8E9Pr-vSdLKAlgTfU-V4-kXf0,68859
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=FxCmMPcbRj9ulJbg3fPzQITfHKeW9I8r1S2v9Odz0WU,15806
73
- cuqi/problem/__init__.py,sha256=JxJty4JqHTOqSG6NeTGiXRQ7OLxiRK9jvVq3lXLeIRw,38
74
- cuqi/problem/_problem.py,sha256=p1UO04GKv5BmdcPR5-xcP-idBsqShBxKJ3WC5qNSMDs,38588
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=X3EWD-26o9UOBsWRuy0ktYsJiUXwpCGm0lvTdQM6dRI,30964
91
- cuqi/testproblem/__init__.py,sha256=DWTOcyuNHMbhEuuWlY5CkYkNDSAqhvsKmJXBLivyblU,202
92
- cuqi/testproblem/_testproblem.py,sha256=EJWG_zXUtmo6GlHBZFqHlRpDC_48tE0XZEu0_C66NS8,52524
93
- cuqi/utilities/__init__.py,sha256=d5QXRzmI6EchS9T4b7eTezSisPWuWklO8ey4YBx9kI0,569
94
- cuqi/utilities/_get_python_variable_name.py,sha256=wxpCaj9f3ZtBNqlGmmuGiITgBaTsY-r94lUIlK6UAU4,2043
95
- cuqi/utilities/_utilities.py,sha256=R7BdNysrE36a4D729DvfrTisWY4paP5nfqdkQxSX3Mg,18431
96
- cuqipy-1.3.0.post0.dev298.dist-info/licenses/LICENSE,sha256=kJWRPrtRoQoZGXyyvu50Uc91X6_0XRaVfT0YZssicys,10799
97
- cuqipy-1.3.0.post0.dev298.dist-info/METADATA,sha256=j-lO1X4RUW9PR0B-YuJuJMl_IoUB5xrmovKuS22yfs0,18624
98
- cuqipy-1.3.0.post0.dev298.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
99
- cuqipy-1.3.0.post0.dev298.dist-info/top_level.txt,sha256=AgmgMc6TKfPPqbjV0kvAoCBN334i_Lwwojc7HE3ZwD0,5
100
- cuqipy-1.3.0.post0.dev298.dist-info/RECORD,,