CUQIpy 1.3.0.post0.dev298__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.
Files changed (59) hide show
  1. cuqi/__init__.py +1 -0
  2. cuqi/_version.py +3 -3
  3. cuqi/density/_density.py +9 -1
  4. cuqi/distribution/_distribution.py +24 -15
  5. cuqi/distribution/_joint_distribution.py +96 -11
  6. cuqi/distribution/_posterior.py +9 -0
  7. cuqi/experimental/__init__.py +1 -2
  8. cuqi/experimental/_recommender.py +4 -4
  9. cuqi/implicitprior/__init__.py +1 -1
  10. cuqi/implicitprior/_restorator.py +35 -1
  11. cuqi/legacy/__init__.py +2 -0
  12. cuqi/legacy/sampler/__init__.py +11 -0
  13. cuqi/legacy/sampler/_conjugate.py +55 -0
  14. cuqi/legacy/sampler/_conjugate_approx.py +52 -0
  15. cuqi/legacy/sampler/_cwmh.py +196 -0
  16. cuqi/legacy/sampler/_gibbs.py +231 -0
  17. cuqi/legacy/sampler/_hmc.py +335 -0
  18. cuqi/legacy/sampler/_langevin_algorithm.py +198 -0
  19. cuqi/legacy/sampler/_laplace_approximation.py +184 -0
  20. cuqi/legacy/sampler/_mh.py +190 -0
  21. cuqi/legacy/sampler/_pcn.py +244 -0
  22. cuqi/legacy/sampler/_rto.py +284 -0
  23. cuqi/legacy/sampler/_sampler.py +182 -0
  24. cuqi/likelihood/_likelihood.py +1 -1
  25. cuqi/model/_model.py +212 -77
  26. cuqi/pde/__init__.py +4 -0
  27. cuqi/pde/_observation_map.py +36 -0
  28. cuqi/pde/_pde.py +52 -21
  29. cuqi/problem/_problem.py +87 -80
  30. cuqi/sampler/__init__.py +120 -8
  31. cuqi/sampler/_conjugate.py +376 -35
  32. cuqi/sampler/_conjugate_approx.py +40 -16
  33. cuqi/sampler/_cwmh.py +132 -138
  34. cuqi/{experimental/mcmc → sampler}/_direct.py +1 -1
  35. cuqi/sampler/_gibbs.py +269 -130
  36. cuqi/sampler/_hmc.py +328 -201
  37. cuqi/sampler/_langevin_algorithm.py +282 -98
  38. cuqi/sampler/_laplace_approximation.py +87 -117
  39. cuqi/sampler/_mh.py +47 -157
  40. cuqi/sampler/_pcn.py +56 -211
  41. cuqi/sampler/_rto.py +206 -140
  42. cuqi/sampler/_sampler.py +540 -135
  43. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/METADATA +1 -1
  44. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/RECORD +47 -45
  45. cuqi/experimental/mcmc/__init__.py +0 -122
  46. cuqi/experimental/mcmc/_conjugate.py +0 -396
  47. cuqi/experimental/mcmc/_conjugate_approx.py +0 -76
  48. cuqi/experimental/mcmc/_cwmh.py +0 -190
  49. cuqi/experimental/mcmc/_gibbs.py +0 -374
  50. cuqi/experimental/mcmc/_hmc.py +0 -460
  51. cuqi/experimental/mcmc/_langevin_algorithm.py +0 -382
  52. cuqi/experimental/mcmc/_laplace_approximation.py +0 -154
  53. cuqi/experimental/mcmc/_mh.py +0 -80
  54. cuqi/experimental/mcmc/_pcn.py +0 -89
  55. cuqi/experimental/mcmc/_rto.py +0 -306
  56. cuqi/experimental/mcmc/_sampler.py +0 -564
  57. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/WHEEL +0 -0
  58. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/licenses/LICENSE +0 -0
  59. {cuqipy-1.3.0.post0.dev298.dist-info → cuqipy-1.4.0.post0.dev61.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: CUQIpy
3
- Version: 1.3.0.post0.dev298
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
@@ -1,6 +1,6 @@
1
- cuqi/__init__.py,sha256=LsGilhl-hBLEn6Glt8S_l0OJzAA1sKit_rui8h-D-p0,488
1
+ cuqi/__init__.py,sha256=TIdTvq0th4ywHVNGFovmEzneXxkpGWC-LlUdrxbPPLM,509
2
2
  cuqi/_messages.py,sha256=fzEBrZT2kbmfecBBPm7spVu7yHdxGARQB4QzXhJbCJ0,415
3
- cuqi/_version.py,sha256=VwUmSwCl1TjQCoMN2OC86V-9oKtS3snnE0i5gC_KQao,510
3
+ cuqi/_version.py,sha256=S2ddEKfXvlEJwt4HQ_HYcSdVnIse2ZS69CQGg95CvD8,509
4
4
  cuqi/config.py,sha256=wcYvz19wkeKW2EKCGIKJiTpWt5kdaxyt4imyRkvtTRA,526
5
5
  cuqi/diagnostics.py,sha256=5OrbJeqpynqRXOe5MtOKKhe7EAVdOEpHIqHnlMW9G_c,3029
6
6
  cuqi/array/__init__.py,sha256=-EeiaiWGNsE3twRS4dD814BIlfxEsNkTCZUc5gjOXb0,30
@@ -13,77 +13,79 @@ cuqi/data/cat.npz,sha256=9H9iJqkvlCCVZZ2IWMfwwfVHbShpQTkZo_WGr7rrp3k,406164
13
13
  cuqi/data/cookie.png,sha256=mr6wUeoIUc5VC2qYj8vafOmTbcRwz0fHz4IIPK9_PnE,984680
14
14
  cuqi/data/satellite.mat,sha256=a0Nz_Ak-Y0m360dH74pa_rpk-MhaQ91ftGTKhQX7I8g,16373
15
15
  cuqi/density/__init__.py,sha256=0zfVcPgqdqiPkss5n_WP_PUt-G3ovHXjokhqEKIlLwA,48
16
- cuqi/density/_density.py,sha256=BG7gtP0cbFYLVgjYQGkNAhM95PR5ocBVLKRlOVX2PyM,7253
16
+ cuqi/density/_density.py,sha256=Pfcq8b9MuTAuXxVwORRyNru_KIAFN1yHp2Y1yNwdyrg,7467
17
17
  cuqi/distribution/__init__.py,sha256=f-HM-SUrvPO66_FAJ6k4TffBq4H94OusRMDOJgcJU2w,779
18
18
  cuqi/distribution/_beta.py,sha256=QlibnuHNcvWjl-du5aRc9QuzS3n4PsyD_8Nc47w-E0Q,2903
19
19
  cuqi/distribution/_cauchy.py,sha256=Qwi21WkwUBnBkLbhR-yCGO0tQ_U_3mmvR0pDMPPPB5c,3296
20
20
  cuqi/distribution/_cmrf.py,sha256=tCbEulM_O7FB3C_W-3IqZp9zGHkTofCdFF0ybHc9UZI,3745
21
21
  cuqi/distribution/_custom.py,sha256=11lnAG7CS15bpV6JOOP--2YyKnAduvXY1IjAOJ1tqO0,10504
22
- cuqi/distribution/_distribution.py,sha256=mDSOjm2-f1we9wbfii2QEZ8gx03X_iZDt9XY4AGlOvE,17982
22
+ cuqi/distribution/_distribution.py,sha256=FWwJy6kM-MYEfN0Dv7DbLL7JHl_VDNAvNe-GqiLiRBc,18290
23
23
  cuqi/distribution/_gamma.py,sha256=VcvBJS51N-MxuX42r9L2j2QYRlzhdgAtQ6Wa5IFO_YE,3536
24
24
  cuqi/distribution/_gaussian.py,sha256=3L1L_3W6i6YuPQ8vnFmju5QsvkLlg4VsgCnj11lYBUE,32977
25
25
  cuqi/distribution/_gmrf.py,sha256=OwId8qQWEtmC2fxVhL4iBHZnc8ZCrZzfV6yGXDE3k30,9522
26
26
  cuqi/distribution/_inverse_gamma.py,sha256=oPJuiYp3O1m547pmmIz9OWesky9YpwLTHT7-9MmcYss,3159
27
- cuqi/distribution/_joint_distribution.py,sha256=gBWDb9Aj27m74mSsm9Jj_0mSu0pcEk9Cwdxrzybiwx8,16710
27
+ cuqi/distribution/_joint_distribution.py,sha256=ALOnQsIrzE8Rx_FYOs4f276u4QZQeN_e0CLC7CJpb-E,20396
28
28
  cuqi/distribution/_laplace.py,sha256=5exLvlzJm2AgfvZ3KUSkjfwlGwwbsktBxP8z0iLMik8,1401
29
29
  cuqi/distribution/_lmrf.py,sha256=rdGoQ-fPe1oW6Z29P-l3woq0NX3_RxUQ2rzm1VzemNM,3290
30
30
  cuqi/distribution/_lognormal.py,sha256=8_hOFQ3iu88ujX8vxmfVEZ0fdmlhTY98PlG5PasPjEg,2612
31
31
  cuqi/distribution/_modifiedhalfnormal.py,sha256=ErULXUFRjbMyCYywaOzfuxtoy-XQmC0McMROo2mTQtc,7313
32
32
  cuqi/distribution/_normal.py,sha256=vhIiAseW09IKh1uy0KUq7RP1IuY7hH5aNM1W_R8Gd_Q,2912
33
- cuqi/distribution/_posterior.py,sha256=zAfL0GECxekZ2lBt1W6_LN0U_xskMwK4VNce5xAF7ig,5018
33
+ cuqi/distribution/_posterior.py,sha256=6LxXAIBzFxyEqx5bUfgqTXVKgXxqNhRItec6FcRVLEE,5350
34
34
  cuqi/distribution/_smoothed_laplace.py,sha256=p-1Y23mYA9omwiHGkEuv3T2mwcPAAoNlCr7T8osNkjE,2925
35
35
  cuqi/distribution/_truncated_normal.py,sha256=_ez3MmO6qpBeP6BKCUlW3IgxuF7k--A7jPGPUhtYK0g,4240
36
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
37
+ cuqi/experimental/__init__.py,sha256=HCI1aG9xn4XPnBfGbCRrFaq3JfmVyBH09IuvdDancsY,154
38
+ cuqi/experimental/_recommender.py,sha256=ulW69nDGwkB8X93OMgMVLcVz2L0T3SZqHKG7jZ9wNm8,7907
39
39
  cuqi/experimental/algebra/__init__.py,sha256=btRAWG58ZfdtK0afXKOg60AX7d76KMBjlZa4AWBCCgU,81
40
40
  cuqi/experimental/algebra/_ast.py,sha256=PdPz19cJMjvnMx4KEzhn4gvxIZX_UViE33Mbttj_5Xw,9873
41
41
  cuqi/experimental/algebra/_orderedset.py,sha256=fKysh4pmI4xF7Y5Z6O86ABzg20o4uBs-v8jmLBMrdpo,2849
42
42
  cuqi/experimental/algebra/_randomvariable.py,sha256=isbFtIWsWXF-yF5Vb56nLy4MCkQM6akjd-dQau4wfbE,19725
43
43
  cuqi/experimental/geometry/__init__.py,sha256=kgoKegfz3Jhr7fpORB_l55z9zLZRtloTLyXFDh1oF2o,47
44
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
45
  cuqi/geometry/__init__.py,sha256=Tz1WGzZBY-QGH3c0GiyKm9XHN8MGGcnU6TUHLZkzB3o,842
59
46
  cuqi/geometry/_geometry.py,sha256=W-oQTZPelVS7fN9qZj6bNBuh-yY0eqOHJ39UwB-WmQY,47562
60
- cuqi/implicitprior/__init__.py,sha256=6z3lvw-tWDyjZSpB3pYzvijSMK9Zlf1IYqOVTtMD2h4,309
47
+ cuqi/implicitprior/__init__.py,sha256=6Fl4Lmld8ikg9sW9tReKRGTCJC6_WCTExHaYuIv34nM,323
61
48
  cuqi/implicitprior/_regularizedGMRF.py,sha256=BUeT4rwJzary9K56fkxCNGCeKZd-2VSgOT8XNHxFPRE,6345
62
49
  cuqi/implicitprior/_regularizedGaussian.py,sha256=9BSKHGEW0OT9OIt_42strDzxBM8mB6A-blcf0kEguHw,21836
63
50
  cuqi/implicitprior/_regularizedUnboundedUniform.py,sha256=uHGYYnTjVxdPbY-5JwocFOH0sHRfGrrLiHWahzH9R8A,3533
64
- cuqi/implicitprior/_restorator.py,sha256=Z350XUJEt7N59Qw-SIUaBljQNDJk4Zb0i_KRFrt2DCg,10087
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
65
  cuqi/likelihood/__init__.py,sha256=QXif382iwZ5bT3ZUqmMs_n70JVbbjxbqMrlQYbMn4Zo,1776
66
- cuqi/likelihood/_likelihood.py,sha256=PuW8ufRefLt6w40JQWqNnEh3YCLxu4pz0h0PcpT8inc,7075
66
+ cuqi/likelihood/_likelihood.py,sha256=I12qQF3h_Z8jj7zb_AYD-SEUn34VCU7VxcTcH25Axao,7074
67
67
  cuqi/model/__init__.py,sha256=jgY2-jyxEMC79vkyH9BpfowW7_DbMRjqedOtO5fykXQ,62
68
- cuqi/model/_model.py,sha256=Y7rMoJzw0FYJiP9pCH8E9Pr-vSdLKAlgTfU-V4-kXf0,68859
68
+ cuqi/model/_model.py,sha256=VwNTBlqQ94k_SQB_Y4ADqMOsrrNCcLMii3n-oTAiMv0,75120
69
69
  cuqi/operator/__init__.py,sha256=0pc9p-KPyl7KtPV0noB0ddI0CP2iYEHw5rbw49D8Njk,136
70
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
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
73
74
  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
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
87
89
  cuqi/samples/__init__.py,sha256=vCs6lVk-pi8RBqa6cIN5wyn6u-K9oEf1Na4k1ZMrYv8,44
88
90
  cuqi/samples/_samples.py,sha256=hUc8OnCF9CTCuDTrGHwwzv3wp8mG_6vsJAFvuQ-x0uA,35832
89
91
  cuqi/solver/__init__.py,sha256=KYgAi_8VoAwljTB3S2I87YnJkRtedskLee7hQp_-zp8,220
@@ -93,8 +95,8 @@ cuqi/testproblem/_testproblem.py,sha256=EJWG_zXUtmo6GlHBZFqHlRpDC_48tE0XZEu0_C66
93
95
  cuqi/utilities/__init__.py,sha256=d5QXRzmI6EchS9T4b7eTezSisPWuWklO8ey4YBx9kI0,569
94
96
  cuqi/utilities/_get_python_variable_name.py,sha256=wxpCaj9f3ZtBNqlGmmuGiITgBaTsY-r94lUIlK6UAU4,2043
95
97
  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,,
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,,
@@ -1,122 +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