arviz 0.18.0__tar.gz → 0.20.0__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.
Files changed (202) hide show
  1. {arviz-0.18.0 → arviz-0.20.0}/CHANGELOG.md +44 -1
  2. {arviz-0.18.0 → arviz-0.20.0}/PKG-INFO +3 -21
  3. {arviz-0.18.0 → arviz-0.20.0}/arviz/__init__.py +2 -1
  4. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/base.py +18 -7
  5. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/converters.py +7 -3
  6. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/inference_data.py +8 -0
  7. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_cmdstan.py +4 -0
  8. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_numpyro.py +1 -1
  9. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/ecdfplot.py +1 -2
  10. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/khatplot.py +8 -3
  11. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/pairplot.py +2 -6
  12. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/ecdfplot.py +1 -2
  13. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/khatplot.py +7 -3
  14. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/traceplot.py +1 -1
  15. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/bpvplot.py +2 -2
  16. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/compareplot.py +4 -4
  17. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/densityplot.py +1 -1
  18. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/dotplot.py +2 -2
  19. arviz-0.20.0/arviz/plots/ecdfplot.py +372 -0
  20. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/essplot.py +2 -2
  21. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/forestplot.py +3 -3
  22. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/hdiplot.py +2 -2
  23. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/kdeplot.py +9 -2
  24. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/khatplot.py +23 -6
  25. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/loopitplot.py +2 -2
  26. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/mcseplot.py +3 -1
  27. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/plot_utils.py +2 -4
  28. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/posteriorplot.py +1 -1
  29. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/rankplot.py +2 -2
  30. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/violinplot.py +1 -1
  31. arviz-0.20.0/arviz/preview.py +17 -0
  32. {arviz-0.18.0 → arviz-0.20.0}/arviz/rcparams.py +27 -2
  33. {arviz-0.18.0 → arviz-0.20.0}/arviz/stats/diagnostics.py +13 -9
  34. arviz-0.20.0/arviz/stats/ecdf_utils.py +324 -0
  35. {arviz-0.18.0 → arviz-0.20.0}/arviz/stats/stats.py +41 -20
  36. {arviz-0.18.0 → arviz-0.20.0}/arviz/stats/stats_utils.py +8 -6
  37. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_data.py +11 -2
  38. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_data_zarr.py +0 -1
  39. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_diagnostics_numba.py +2 -7
  40. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_helpers.py +2 -2
  41. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_plot_utils.py +5 -13
  42. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_plots_matplotlib.py +95 -2
  43. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_rcparams.py +12 -0
  44. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_stats.py +1 -1
  45. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_stats_ecdf_utils.py +15 -2
  46. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_stats_numba.py +2 -7
  47. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_utils_numba.py +2 -5
  48. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_pystan.py +5 -5
  49. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/helpers.py +17 -9
  50. {arviz-0.18.0 → arviz-0.20.0}/arviz/utils.py +4 -0
  51. {arviz-0.18.0 → arviz-0.20.0}/arviz.egg-info/PKG-INFO +3 -21
  52. {arviz-0.18.0 → arviz-0.20.0}/arviz.egg-info/SOURCES.txt +1 -0
  53. {arviz-0.18.0 → arviz-0.20.0}/arviz.egg-info/requires.txt +9 -4
  54. {arviz-0.18.0 → arviz-0.20.0}/requirements-docs.txt +2 -1
  55. {arviz-0.18.0 → arviz-0.20.0}/requirements-optional.txt +3 -2
  56. {arviz-0.18.0 → arviz-0.20.0}/requirements.txt +1 -2
  57. {arviz-0.18.0 → arviz-0.20.0}/setup.py +4 -1
  58. arviz-0.18.0/arviz/plots/ecdfplot.py +0 -248
  59. arviz-0.18.0/arviz/stats/ecdf_utils.py +0 -166
  60. {arviz-0.18.0 → arviz-0.20.0}/CODE_OF_CONDUCT.md +0 -0
  61. {arviz-0.18.0 → arviz-0.20.0}/CONTRIBUTING.md +0 -0
  62. {arviz-0.18.0 → arviz-0.20.0}/GOVERNANCE.md +0 -0
  63. {arviz-0.18.0 → arviz-0.20.0}/LICENSE +0 -0
  64. {arviz-0.18.0 → arviz-0.20.0}/MANIFEST.in +0 -0
  65. {arviz-0.18.0 → arviz-0.20.0}/README.md +0 -0
  66. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/__init__.py +0 -0
  67. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/datasets.py +0 -0
  68. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/example_data/code/radon/radon.json +0 -0
  69. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/example_data/data/centered_eight.nc +0 -0
  70. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/example_data/data/non_centered_eight.nc +0 -0
  71. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/example_data/data_local.json +0 -0
  72. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/example_data/data_remote.json +0 -0
  73. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_beanmachine.py +0 -0
  74. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_cmdstanpy.py +0 -0
  75. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_datatree.py +0 -0
  76. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_dict.py +0 -0
  77. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_emcee.py +0 -0
  78. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_json.py +0 -0
  79. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_netcdf.py +0 -0
  80. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_pyjags.py +0 -0
  81. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_pyro.py +0 -0
  82. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_pystan.py +0 -0
  83. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/io_zarr.py +0 -0
  84. {arviz-0.18.0 → arviz-0.20.0}/arviz/data/utils.py +0 -0
  85. {arviz-0.18.0 → arviz-0.20.0}/arviz/labels.py +0 -0
  86. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/__init__.py +0 -0
  87. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/autocorrplot.py +0 -0
  88. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/__init__.py +0 -0
  89. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/__init__.py +0 -0
  90. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/autocorrplot.py +0 -0
  91. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/bfplot.py +0 -0
  92. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/bpvplot.py +0 -0
  93. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/compareplot.py +0 -0
  94. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/densityplot.py +0 -0
  95. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/distcomparisonplot.py +0 -0
  96. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/distplot.py +0 -0
  97. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/dotplot.py +0 -0
  98. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/elpdplot.py +0 -0
  99. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/energyplot.py +0 -0
  100. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/essplot.py +0 -0
  101. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/forestplot.py +0 -0
  102. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/hdiplot.py +0 -0
  103. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/kdeplot.py +0 -0
  104. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/lmplot.py +0 -0
  105. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/loopitplot.py +0 -0
  106. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/mcseplot.py +0 -0
  107. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/parallelplot.py +0 -0
  108. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/posteriorplot.py +0 -0
  109. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/ppcplot.py +0 -0
  110. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/rankplot.py +0 -0
  111. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/separationplot.py +0 -0
  112. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/traceplot.py +0 -0
  113. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/bokeh/violinplot.py +0 -0
  114. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/__init__.py +0 -0
  115. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/autocorrplot.py +0 -0
  116. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/bfplot.py +0 -0
  117. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/bpvplot.py +0 -0
  118. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/compareplot.py +0 -0
  119. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/densityplot.py +0 -0
  120. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/distcomparisonplot.py +0 -0
  121. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/distplot.py +0 -0
  122. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/dotplot.py +0 -0
  123. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/elpdplot.py +0 -0
  124. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/energyplot.py +0 -0
  125. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/essplot.py +0 -0
  126. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/forestplot.py +0 -0
  127. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/hdiplot.py +0 -0
  128. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/kdeplot.py +0 -0
  129. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/lmplot.py +0 -0
  130. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/loopitplot.py +0 -0
  131. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/mcseplot.py +0 -0
  132. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/pairplot.py +0 -0
  133. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/parallelplot.py +0 -0
  134. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/posteriorplot.py +0 -0
  135. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/ppcplot.py +0 -0
  136. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/rankplot.py +0 -0
  137. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/separationplot.py +0 -0
  138. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/tsplot.py +0 -0
  139. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/backends/matplotlib/violinplot.py +0 -0
  140. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/bfplot.py +0 -0
  141. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/distcomparisonplot.py +0 -0
  142. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/distplot.py +0 -0
  143. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/elpdplot.py +0 -0
  144. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/energyplot.py +0 -0
  145. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/lmplot.py +0 -0
  146. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/pairplot.py +0 -0
  147. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/parallelplot.py +0 -0
  148. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/ppcplot.py +0 -0
  149. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/separationplot.py +0 -0
  150. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-bluish.mplstyle +0 -0
  151. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-brownish.mplstyle +0 -0
  152. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-colors.mplstyle +0 -0
  153. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-cyanish.mplstyle +0 -0
  154. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-darkgrid.mplstyle +0 -0
  155. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-doc.mplstyle +0 -0
  156. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-docgrid.mplstyle +0 -0
  157. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-grayscale.mplstyle +0 -0
  158. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-greenish.mplstyle +0 -0
  159. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-orangish.mplstyle +0 -0
  160. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-plasmish.mplstyle +0 -0
  161. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-purplish.mplstyle +0 -0
  162. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-redish.mplstyle +0 -0
  163. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-royish.mplstyle +0 -0
  164. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-viridish.mplstyle +0 -0
  165. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-white.mplstyle +0 -0
  166. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/styles/arviz-whitegrid.mplstyle +0 -0
  167. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/traceplot.py +0 -0
  168. {arviz-0.18.0 → arviz-0.20.0}/arviz/plots/tsplot.py +0 -0
  169. {arviz-0.18.0 → arviz-0.20.0}/arviz/py.typed +0 -0
  170. {arviz-0.18.0 → arviz-0.20.0}/arviz/sel_utils.py +0 -0
  171. {arviz-0.18.0 → arviz-0.20.0}/arviz/static/css/style.css +0 -0
  172. {arviz-0.18.0 → arviz-0.20.0}/arviz/static/html/icons-svg-inline.html +0 -0
  173. {arviz-0.18.0 → arviz-0.20.0}/arviz/stats/__init__.py +0 -0
  174. {arviz-0.18.0 → arviz-0.20.0}/arviz/stats/density_utils.py +0 -0
  175. {arviz-0.18.0 → arviz-0.20.0}/arviz/stats/stats_refitting.py +0 -0
  176. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/__init__.py +0 -0
  177. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/__init__.py +0 -0
  178. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_diagnostics.py +0 -0
  179. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_labels.py +0 -0
  180. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_plots_bokeh.py +0 -0
  181. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_stats_utils.py +0 -0
  182. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/base_tests/test_utils.py +0 -0
  183. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/conftest.py +0 -0
  184. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/__init__.py +0 -0
  185. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_beanmachine.py +0 -0
  186. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_cmdstan.py +0 -0
  187. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_cmdstanpy.py +0 -0
  188. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_emcee.py +0 -0
  189. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_numpyro.py +0 -0
  190. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_pyjags.py +0 -0
  191. {arviz-0.18.0 → arviz-0.20.0}/arviz/tests/external_tests/test_data_pyro.py +0 -0
  192. {arviz-0.18.0 → arviz-0.20.0}/arviz/wrappers/__init__.py +0 -0
  193. {arviz-0.18.0 → arviz-0.20.0}/arviz/wrappers/base.py +0 -0
  194. {arviz-0.18.0 → arviz-0.20.0}/arviz/wrappers/wrap_pymc.py +0 -0
  195. {arviz-0.18.0 → arviz-0.20.0}/arviz/wrappers/wrap_stan.py +0 -0
  196. {arviz-0.18.0 → arviz-0.20.0}/arviz.egg-info/dependency_links.txt +0 -0
  197. {arviz-0.18.0 → arviz-0.20.0}/arviz.egg-info/top_level.txt +0 -0
  198. {arviz-0.18.0 → arviz-0.20.0}/pyproject.toml +0 -0
  199. {arviz-0.18.0 → arviz-0.20.0}/requirements-dev.txt +0 -0
  200. {arviz-0.18.0 → arviz-0.20.0}/requirements-external.txt +0 -0
  201. {arviz-0.18.0 → arviz-0.20.0}/requirements-test.txt +0 -0
  202. {arviz-0.18.0 → arviz-0.20.0}/setup.cfg +0 -0
@@ -1,9 +1,46 @@
1
1
  # Change Log
2
2
 
3
- ## v0.18.0 (2024 Apr 4)
3
+ ## v0.20.0 (2024 Sep 28)
4
4
 
5
5
  ### New features
6
+ - Add optimized simultaneous ECDF confidence bands ([2368](https://github.com/arviz-devs/arviz/pull/2368))
7
+ - Add support for setting groups with `idata[group]` ([2374](https://github.com/arviz-devs/arviz/pull/2374))
8
+
9
+ ### Maintenance and fixes
10
+ - Make `dm-tree` and optional dependency ([2379](https://github.com/arviz-devs/arviz/pull/2379))
11
+ - Fix bug in `psislw` modifying input inplace ([2377](https://github.com/arviz-devs/arviz/pull/2377))
12
+ - Fix behaviour of two dimensional KDE plot with recent matplotlib releases ([2383](https://github.com/arviz-devs/arviz/pull/2383))
13
+ - Make defaults in `plot_compare` more intuitive ([2388](https://github.com/arviz-devs/arviz/pull/2388))
14
+
15
+ ### Documentation
16
+ - Added extensions of virtual environments in [.gitignore](https://github.com/arviz-devs/arviz/blob/main/.gitignore) ([2371](https://github.com/arviz-devs/arviz/issues/2371))
17
+ - Fixed the issue in the [Contribution References Documentation](https://python.arviz.org/en/latest/contributing/index.html) ([2369](https://github.com/arviz-devs/arviz/issues/2369))
18
+ - Improve docstrings for `loo` and `waic` ([2366](https://github.com/arviz-devs/arviz/pull/2366))
19
+
20
+ ## v0.19.0 (2024 Jul 19)
21
+
22
+ ### New features
23
+ - Use revised Pareto k threshold ([2349](https://github.com/arviz-devs/arviz/pull/2349))
24
+ - Added arguments `ci_prob`, `eval_points`, `rvs`, and `random_state` to `plot_ecdf` ([2316](https://github.com/arviz-devs/arviz/pull/2316))
25
+ - Deprecated rcParam `stats.hdi_prob` and replaced with `stats.ci_prob` ([2316](https://github.com/arviz-devs/arviz/pull/2316))
26
+ - Expose features from [arviz-base](https://arviz-base.readthedocs.io), [arviz-stats](https://arviz-stats.readthedocs.io) and [arviz-plots](https://arviz-plots.readthedocs.io) as `arviz.preview`
27
+ submodule ([2361](https://github.com/arviz-devs/arviz/pull/2361))
28
+
29
+ ### Maintenance and fixes
30
+ - Ensure support with numpy 2.0 ([2321](https://github.com/arviz-devs/arviz/pull/2321))
31
+ - Update testing strategy to include an environment without optional dependencies and
32
+ an environment with [scientific python nightlies](https://anaconda.org/scientific-python-nightly-wheels) ([2321](https://github.com/arviz-devs/arviz/pull/2321))
33
+ - Address bokeh related deprecations ([2362](https://github.com/arviz-devs/arviz/pull/2362))
34
+
35
+ - Fix legend overwriting issue in `plot_trace` ([2334](https://github.com/arviz-devs/arviz/pull/2334))
6
36
 
37
+ ### Deprecation
38
+ - Support for arrays and DataArrays in plot_khat has been deprecated. Only ELPDdata will be supported in the future ([2349](https://github.com/arviz-devs/arviz/pull/2349))
39
+ - Removed arguments `values2`, `fpr`, `pointwise`, and `pit` in `plot_ecdf` ([2316](https://github.com/arviz-devs/arviz/pull/2316))
40
+
41
+ ## v0.18.0 (2024 Apr 4)
42
+
43
+ ### New features
7
44
  - Add new example data `rugby_field` and update `rugby` example data ([2322](https://github.com/arviz-devs/arviz/pull/2322))
8
45
  - Support for `pytree`s and robust to nested dictionaries. ([2291](https://github.com/arviz-devs/arviz/pull/2291))
9
46
  - Add `.close` method to `InferenceData` ([2338](https://github.com/arviz-devs/arviz/pull/2338))
@@ -13,6 +50,12 @@
13
50
  - Fix deprecation warnings in multiple dependencies ([2329](https://github.com/arviz-devs/arviz/pull/2329),
14
51
  [2332](https://github.com/arviz-devs/arviz/pull/2332) and [2333](https://github.com/arviz-devs/arviz/pull/2333))
15
52
 
53
+ ### Deprecation
54
+
55
+ - Removed arguments `values2`, `fpr`, `pointwise`, `npoints`, and `pit` in `plot_ecdf` ([2316](https://github.com/arviz-devs/arviz/pull/2316))
56
+
57
+ ### Documentation
58
+
16
59
  ## v0.17.1 (2024 Mar 13)
17
60
 
18
61
  ### Maintenance and fixes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: arviz
3
- Version: 0.18.0
3
+ Version: 0.20.0
4
4
  Summary: Exploratory analysis of Bayesian models
5
5
  Home-page: http://github.com/arviz-devs/arviz
6
6
  Author: ArviZ Developers
@@ -20,27 +20,9 @@ Classifier: Topic :: Scientific/Engineering :: Visualization
20
20
  Classifier: Topic :: Scientific/Engineering :: Mathematics
21
21
  Requires-Python: >=3.10
22
22
  Description-Content-Type: text/markdown
23
- License-File: LICENSE
24
- Requires-Dist: setuptools>=60.0.0
25
- Requires-Dist: matplotlib>=3.5
26
- Requires-Dist: numpy<2.0,>=1.23.0
27
- Requires-Dist: scipy>=1.9.0
28
- Requires-Dist: packaging
29
- Requires-Dist: pandas>=1.5.0
30
- Requires-Dist: dm-tree>=0.1.8
31
- Requires-Dist: xarray>=2022.6.0
32
- Requires-Dist: h5netcdf>=1.0.2
33
- Requires-Dist: typing_extensions>=4.1.0
34
- Requires-Dist: xarray-einstats>=0.3
35
23
  Provides-Extra: all
36
- Requires-Dist: numba; extra == "all"
37
- Requires-Dist: netcdf4; extra == "all"
38
- Requires-Dist: bokeh<3.0,>=1.4.0; extra == "all"
39
- Requires-Dist: contourpy; extra == "all"
40
- Requires-Dist: ujson; extra == "all"
41
- Requires-Dist: dask[distributed]; extra == "all"
42
- Requires-Dist: zarr>=2.5.0; extra == "all"
43
- Requires-Dist: xarray-datatree; extra == "all"
24
+ Provides-Extra: preview
25
+ License-File: LICENSE
44
26
 
45
27
  <img src="https://raw.githubusercontent.com/arviz-devs/arviz-project/main/arviz_logos/ArviZ.png#gh-light-mode-only" width=200></img>
46
28
  <img src="https://raw.githubusercontent.com/arviz-devs/arviz-project/main/arviz_logos/ArviZ_white.png#gh-dark-mode-only" width=200></img>
@@ -1,6 +1,6 @@
1
1
  # pylint: disable=wildcard-import,invalid-name,wrong-import-position
2
2
  """ArviZ is a library for exploratory analysis of Bayesian models."""
3
- __version__ = "0.18.0"
3
+ __version__ = "0.20.0"
4
4
 
5
5
  import logging
6
6
  import os
@@ -37,6 +37,7 @@ from .stats import *
37
37
  from .rcparams import rc_context, rcParams
38
38
  from .utils import Numba, Dask, interactive_backend
39
39
  from .wrappers import *
40
+ from . import preview
40
41
 
41
42
  # add ArviZ's styles to matplotlib's styles
42
43
  _arviz_style_path = os.path.join(os.path.dirname(__file__), "plots", "styles")
@@ -9,9 +9,13 @@ from copy import deepcopy
9
9
  from typing import Any, Callable, Dict, List, Optional, Tuple, TypeVar, Union
10
10
 
11
11
  import numpy as np
12
- import tree
13
12
  import xarray as xr
14
13
 
14
+ try:
15
+ import tree
16
+ except ImportError:
17
+ tree = None
18
+
15
19
  try:
16
20
  import ujson as json
17
21
  except ImportError:
@@ -89,6 +93,9 @@ def _yield_flat_up_to(shallow_tree, input_tree, path=()):
89
93
  input_tree.
90
94
  """
91
95
  # pylint: disable=protected-access
96
+ if tree is None:
97
+ raise ImportError("Missing optional dependency 'dm-tree'. Use pip or conda to install it")
98
+
92
99
  if isinstance(shallow_tree, tree._TEXT_OR_BYTES) or not (
93
100
  isinstance(shallow_tree, tree.collections_abc.Mapping)
94
101
  or tree._is_namedtuple(shallow_tree)
@@ -299,7 +306,7 @@ def numpy_to_data_array(
299
306
  return xr.DataArray(ary, coords=coords, dims=dims)
300
307
 
301
308
 
302
- def pytree_to_dataset(
309
+ def dict_to_dataset(
303
310
  data,
304
311
  *,
305
312
  attrs=None,
@@ -312,6 +319,8 @@ def pytree_to_dataset(
312
319
  ):
313
320
  """Convert a dictionary or pytree of numpy arrays to an xarray.Dataset.
314
321
 
322
+ ArviZ itself supports conversion of flat dictionaries.
323
+ Suport for pytrees requires ``dm-tree`` which is an optional dependency.
315
324
  See https://jax.readthedocs.io/en/latest/pytrees.html for what a pytree is, but
316
325
  this inclues at least dictionaries and tuple types.
317
326
 
@@ -386,10 +395,12 @@ def pytree_to_dataset(
386
395
  """
387
396
  if dims is None:
388
397
  dims = {}
389
- try:
390
- data = {k[0] if len(k) == 1 else k: v for k, v in _flatten_with_path(data)}
391
- except TypeError: # probably unsortable keys -- the function will still work if
392
- pass # it is an honest dictionary.
398
+
399
+ if tree is not None:
400
+ try:
401
+ data = {k[0] if len(k) == 1 else k: v for k, v in _flatten_with_path(data)}
402
+ except TypeError: # probably unsortable keys -- the function will still work if
403
+ pass # it is an honest dictionary.
393
404
 
394
405
  data_vars = {
395
406
  key: numpy_to_data_array(
@@ -406,7 +417,7 @@ def pytree_to_dataset(
406
417
  return xr.Dataset(data_vars=data_vars, attrs=make_attrs(attrs=attrs, library=library))
407
418
 
408
419
 
409
- dict_to_dataset = pytree_to_dataset
420
+ pytree_to_dataset = dict_to_dataset
410
421
 
411
422
 
412
423
  def make_attrs(attrs=None, library=None):
@@ -1,9 +1,13 @@
1
1
  """High level conversion functions."""
2
2
 
3
3
  import numpy as np
4
- import tree
5
4
  import xarray as xr
6
5
 
6
+ try:
7
+ from tree import is_nested
8
+ except ImportError:
9
+ is_nested = lambda obj: False
10
+
7
11
  from .base import dict_to_dataset
8
12
  from .inference_data import InferenceData
9
13
  from .io_beanmachine import from_beanmachine
@@ -107,7 +111,7 @@ def convert_to_inference_data(obj, *, group="posterior", coords=None, dims=None,
107
111
  dataset = obj.to_dataset()
108
112
  elif isinstance(obj, dict):
109
113
  dataset = dict_to_dataset(obj, coords=coords, dims=dims)
110
- elif tree.is_nested(obj) and not isinstance(obj, (list, tuple)):
114
+ elif is_nested(obj) and not isinstance(obj, (list, tuple)):
111
115
  dataset = dict_to_dataset(obj, coords=coords, dims=dims)
112
116
  elif isinstance(obj, np.ndarray):
113
117
  dataset = dict_to_dataset({"x": obj}, coords=coords, dims=dims)
@@ -122,7 +126,7 @@ def convert_to_inference_data(obj, *, group="posterior", coords=None, dims=None,
122
126
  "xarray dataarray",
123
127
  "xarray dataset",
124
128
  "dict",
125
- "pytree",
129
+ "pytree (if 'dm-tree' is installed)",
126
130
  "netcdf filename",
127
131
  "numpy array",
128
132
  "pystan fit",
@@ -266,6 +266,14 @@ class InferenceData(Mapping[str, xr.Dataset]):
266
266
  raise KeyError(key)
267
267
  return getattr(self, key)
268
268
 
269
+ def __setitem__(self, key: str, value: xr.Dataset):
270
+ """Set item by key and update group list accordingly."""
271
+ if key.startswith(WARMUP_TAG):
272
+ self._groups_warmup.append(key)
273
+ else:
274
+ self._groups.append(key)
275
+ setattr(self, key, value)
276
+
269
277
  def groups(self) -> List[str]:
270
278
  """Return all groups present in InferenceData object."""
271
279
  return self._groups_all
@@ -738,6 +738,7 @@ def _process_configuration(comments):
738
738
  elif "=" in comment:
739
739
  match_int = re.search(r"^(\S+)\s*=\s*([-+]?[0-9]+)$", comment)
740
740
  match_float = re.search(r"^(\S+)\s*=\s*([-+]?[0-9]+\.[0-9]+)$", comment)
741
+ match_str_bool = re.search(r"^(\S+)\s*=\s*(true|false)$", comment)
741
742
  match_str = re.search(r"^(\S+)\s*=\s*(\S+)$", comment)
742
743
  match_empty = re.search(r"^(\S+)\s*=\s*$", comment)
743
744
  if match_int:
@@ -746,6 +747,9 @@ def _process_configuration(comments):
746
747
  elif match_float:
747
748
  key, value = match_float.group(1), match_float.group(2)
748
749
  results[key] = float(value)
750
+ elif match_str_bool:
751
+ key, value = match_str_bool.group(1), match_str_bool.group(2)
752
+ results[key] = int(value == "true")
749
753
  elif match_str:
750
754
  key, value = match_str.group(1), match_str.group(2)
751
755
  results[key] = value
@@ -194,7 +194,7 @@ class NumPyroConverter:
194
194
  )
195
195
  for obs_name, log_like in log_likelihood_dict.items():
196
196
  shape = (self.nchains, self.ndraws) + log_like.shape[1:]
197
- data[obs_name] = np.reshape(log_like.copy(), shape)
197
+ data[obs_name] = np.reshape(np.asarray(log_like), shape)
198
198
  return dict_to_dataset(
199
199
  data,
200
200
  library=self.numpyro,
@@ -13,7 +13,6 @@ def plot_ecdf(
13
13
  x_bands,
14
14
  lower,
15
15
  higher,
16
- confidence_bands,
17
16
  plot_kwargs,
18
17
  fill_kwargs,
19
18
  plot_outline_kwargs,
@@ -58,7 +57,7 @@ def plot_ecdf(
58
57
  plot_outline_kwargs.setdefault("color", to_hex("C0"))
59
58
  plot_outline_kwargs.setdefault("alpha", 0.2)
60
59
 
61
- if confidence_bands:
60
+ if x_bands is not None:
62
61
  ax.step(x_coord, y_coord, **plot_kwargs)
63
62
 
64
63
  if fill_band:
@@ -21,6 +21,7 @@ def plot_khat(
21
21
  figsize,
22
22
  xdata,
23
23
  khats,
24
+ good_k,
24
25
  kwargs,
25
26
  threshold,
26
27
  coord_labels,
@@ -53,7 +54,11 @@ def plot_khat(
53
54
 
54
55
  if hlines_kwargs is None:
55
56
  hlines_kwargs = {}
56
- hlines_kwargs.setdefault("hlines", [0, 0.5, 0.7, 1])
57
+
58
+ if good_k is None:
59
+ good_k = 0.7
60
+
61
+ hlines_kwargs.setdefault("hlines", [0, good_k, 1])
57
62
 
58
63
  cmap = None
59
64
  if isinstance(color, str):
@@ -75,7 +80,7 @@ def plot_khat(
75
80
  rgba_c = cmap(color)
76
81
 
77
82
  khats = khats if isinstance(khats, np.ndarray) else khats.values.flatten()
78
- alphas = 0.5 + 0.2 * (khats > 0.5) + 0.3 * (khats > 1)
83
+ alphas = 0.5 + 0.2 * (khats > good_k) + 0.3 * (khats > 1)
79
84
 
80
85
  rgba_c = vectorized_to_hex(rgba_c)
81
86
 
@@ -130,7 +135,7 @@ def plot_khat(
130
135
  xmax = len(khats)
131
136
 
132
137
  if show_bins:
133
- bin_edges = np.array([ymin, 0.5, 0.7, 1, ymax])
138
+ bin_edges = np.array([ymin, good_k, 1, ymax])
134
139
  bin_edges = bin_edges[(bin_edges >= ymin) & (bin_edges <= ymax)]
135
140
  hist, _, _ = histogram(khats, bin_edges)
136
141
  for idx, count in enumerate(hist):
@@ -174,12 +174,8 @@ def plot_pair(
174
174
  source = ColumnDataSource(data=source_dict)
175
175
 
176
176
  if divergences:
177
- source_nondiv = CDSView(
178
- source=source, filters=[GroupFilter(column_name=divergenve_name, group="0")]
179
- )
180
- source_div = CDSView(
181
- source=source, filters=[GroupFilter(column_name=divergenve_name, group="1")]
182
- )
177
+ source_nondiv = CDSView(filter=GroupFilter(column_name=divergenve_name, group="0"))
178
+ source_div = CDSView(filter=GroupFilter(column_name=divergenve_name, group="1"))
183
179
 
184
180
  def get_width_and_height(jointplot, rotate):
185
181
  """Compute subplots dimensions for two or more variables."""
@@ -13,7 +13,6 @@ def plot_ecdf(
13
13
  x_bands,
14
14
  lower,
15
15
  higher,
16
- confidence_bands,
17
16
  plot_kwargs,
18
17
  fill_kwargs,
19
18
  plot_outline_kwargs,
@@ -59,7 +58,7 @@ def plot_ecdf(
59
58
 
60
59
  ax.step(x_coord, y_coord, **plot_kwargs)
61
60
 
62
- if confidence_bands:
61
+ if x_bands is not None:
63
62
  if fill_band:
64
63
  ax.fill_between(x_bands, lower, higher, **fill_kwargs)
65
64
  else:
@@ -20,6 +20,7 @@ def plot_khat(
20
20
  figsize,
21
21
  xdata,
22
22
  khats,
23
+ good_k,
23
24
  kwargs,
24
25
  threshold,
25
26
  coord_labels,
@@ -61,8 +62,11 @@ def plot_khat(
61
62
  backend_kwargs.setdefault("figsize", figsize)
62
63
  backend_kwargs["squeeze"] = True
63
64
 
65
+ if good_k is None:
66
+ good_k = 0.7
67
+
64
68
  hlines_kwargs = matplotlib_kwarg_dealiaser(hlines_kwargs, "hlines")
65
- hlines_kwargs.setdefault("hlines", [0, 0.5, 0.7, 1])
69
+ hlines_kwargs.setdefault("hlines", [0, good_k, 1])
66
70
  hlines_kwargs.setdefault("linestyle", [":", "-.", "--", "-"])
67
71
  hlines_kwargs.setdefault("alpha", 0.7)
68
72
  hlines_kwargs.setdefault("zorder", -1)
@@ -102,7 +106,7 @@ def plot_khat(
102
106
  rgba_c = cmap(norm_fun(color))
103
107
 
104
108
  khats = khats if isinstance(khats, np.ndarray) else khats.values.flatten()
105
- alphas = 0.5 + 0.2 * (khats > 0.5) + 0.3 * (khats > 1)
109
+ alphas = 0.5 + 0.2 * (khats > good_k) + 0.3 * (khats > 1)
106
110
  rgba_c[:, 3] = alphas
107
111
  rgba_c = vectorized_to_hex(rgba_c)
108
112
  kwargs["c"] = rgba_c
@@ -151,7 +155,7 @@ def plot_khat(
151
155
  )
152
156
 
153
157
  if show_bins:
154
- bin_edges = np.array([ymin, 0.5, 0.7, 1, ymax])
158
+ bin_edges = np.array([ymin, good_k, 1, ymax])
155
159
  bin_edges = bin_edges[(bin_edges >= ymin) & (bin_edges <= ymax)]
156
160
  hist, _, _ = histogram(khats, bin_edges)
157
161
  for idx, count in enumerate(hist):
@@ -440,7 +440,7 @@ def plot_trace(
440
440
  [], [], label="combined", **dealiase_sel_kwargs(plot_kwargs, chain_prop, -1)
441
441
  ),
442
442
  )
443
- ax.figure.axes[0].legend(handles=handles, title="chain", loc="upper right")
443
+ ax.figure.axes[1].legend(handles=handles, title="chain", loc="upper right")
444
444
 
445
445
  if axes is None:
446
446
  axes = np.array(ax.figure.axes).reshape(-1, 2)
@@ -80,7 +80,7 @@ def plot_bpv(
80
80
  hdi_prob : float, optional
81
81
  Probability for the highest density interval for the analytical reference distribution when
82
82
  ``kind=u_values``. Should be in the interval (0, 1]. Defaults to the
83
- rcParam ``stats.hdi_prob``. See :ref:`this section <common_hdi_prob>` for usage examples.
83
+ rcParam ``stats.ci_prob``. See :ref:`this section <common_hdi_prob>` for usage examples.
84
84
  color : str, optional
85
85
  Matplotlib color
86
86
  grid : tuple, optional
@@ -202,7 +202,7 @@ def plot_bpv(
202
202
  raise TypeError("`reference` argument must be either `analytical`, `samples`, or `None`")
203
203
 
204
204
  if hdi_prob is None:
205
- hdi_prob = rcParams["stats.hdi_prob"]
205
+ hdi_prob = rcParams["stats.ci_prob"]
206
206
  elif not 1 >= hdi_prob > 0:
207
207
  raise ValueError("The value of hdi_prob should be in the interval (0, 1]")
208
208
 
@@ -11,9 +11,9 @@ def plot_compare(
11
11
  comp_df,
12
12
  insample_dev=False,
13
13
  plot_standard_error=True,
14
- plot_ic_diff=True,
14
+ plot_ic_diff=False,
15
15
  order_by_rank=True,
16
- legend=True,
16
+ legend=False,
17
17
  title=True,
18
18
  figsize=None,
19
19
  textsize=None,
@@ -45,12 +45,12 @@ def plot_compare(
45
45
  penalization given by the effective number of parameters (p_loo or p_waic).
46
46
  plot_standard_error : bool, default True
47
47
  Plot the standard error of the ELPD.
48
- plot_ic_diff : bool, default True
48
+ plot_ic_diff : bool, default False
49
49
  Plot standard error of the difference in ELPD between each model
50
50
  and the top-ranked model.
51
51
  order_by_rank : bool, default True
52
52
  If True ensure the best model is used as reference.
53
- legend : bool, default True
53
+ legend : bool, default False
54
54
  Add legend to figure.
55
55
  figsize : (float, float), optional
56
56
  If `None`, size is (6, num of models) inches.
@@ -209,7 +209,7 @@ def plot_density(
209
209
  )
210
210
 
211
211
  if hdi_prob is None:
212
- hdi_prob = rcParams["stats.hdi_prob"]
212
+ hdi_prob = rcParams["stats.ci_prob"]
213
213
  elif not 1 >= hdi_prob > 0:
214
214
  raise ValueError("The value of hdi_prob should be in the interval (0, 1]")
215
215
 
@@ -67,7 +67,7 @@ def plot_dot(
67
67
  The shape of the marker. Valid for matplotlib backend.
68
68
  hdi_prob : float, optional
69
69
  Valid only when point_interval is True. Plots HDI for chosen percentage of density.
70
- Defaults to ``stats.hdi_prob`` rcParam. See :ref:`this section <common_hdi_prob>`
70
+ Defaults to ``stats.ci_prob`` rcParam. See :ref:`this section <common_hdi_prob>`
71
71
  for usage examples.
72
72
  rotated : bool, default False
73
73
  Whether to rotate the dot plot by 90 degrees.
@@ -151,7 +151,7 @@ def plot_dot(
151
151
  values.sort()
152
152
 
153
153
  if hdi_prob is None:
154
- hdi_prob = rcParams["stats.hdi_prob"]
154
+ hdi_prob = rcParams["stats.ci_prob"]
155
155
  elif not 1 >= hdi_prob > 0:
156
156
  raise ValueError("The value of hdi_prob should be in the interval (0, 1]")
157
157