Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESS Plot #58

Merged
merged 24 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d2c30cb
First commit for essplot and scatter_xy visual element
imperorrp Jul 3, 2024
0e662cd
update for ess plot and addition of 'x' aesthetic for 'model' dim
imperorrp Jul 8, 2024
32167b3
addition of quantile plot and updated x aesthetic mapping
imperorrp Jul 14, 2024
c6a8c2d
Added rugplot to essplot
imperorrp Jul 16, 2024
eacdb43
updates to essplot
imperorrp Jul 23, 2024
9adcb32
fixed default value for arg 'extra_methods'
imperorrp Jul 23, 2024
1674ab6
modified scatter_xy visual element to take into account _process_da_x…
imperorrp Jul 23, 2024
358cd5e
Added color/linestyles aesthetics and simplified min_ess plotting
imperorrp Aug 2, 2024
7513d77
Added annotate_xy visual element, applied to essplot for extra_methods
imperorrp Aug 11, 2024
4fd998d
visual element vertical alignment logic modification and arviz-stats …
imperorrp Aug 19, 2024
6a8d8ee
added docs for essplot
imperorrp Aug 20, 2024
20ff025
tests for essplot
imperorrp Aug 21, 2024
6c3c906
added scatter_xy to visuals.rst
imperorrp Aug 21, 2024
ac8b62a
added rug=True to example gallery plot_ess_local
imperorrp Aug 21, 2024
da85925
fixes for rugplot issue and hypothesis test failures
imperorrp Aug 21, 2024
24fe194
shifted mean_ess, sd_ess computing to before plot_kwargs check+artist…
imperorrp Aug 26, 2024
e66beb2
Updated plot_ess and tests
imperorrp Aug 30, 2024
85d0117
updated .toml file for arviz-stats dependency
imperorrp Sep 2, 2024
f7698a2
Modified figsize to more of a plot_forest approach, fixed order of pl…
imperorrp Sep 2, 2024
74e2dd8
Updated plot_ess docstring
imperorrp Sep 2, 2024
1ca070c
Switched from .grid to .wrap, removed unused figsize coeffs, disabled…
imperorrp Sep 2, 2024
7726c57
final fixes
OriolAbril Sep 10, 2024
8b053d6
update pyproject requirements
OriolAbril Oct 17, 2024
56cb9c6
pylint
OriolAbril Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ max-locals=15
max-parents=7

# Maximum number of public methods for a class (see R0904).
max-public-methods=20
max-public-methods=25
imperorrp marked this conversation as resolved.
Show resolved Hide resolved

# Maximum number of return / yield for function / method body
max-returns=6
Expand Down
3 changes: 2 additions & 1 deletion docs/source/api/plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ A complementary introduction and guide to ``plot_...`` functions is available at

plot_compare
plot_dist
plot_ess
plot_forest
plot_ridge
plot_trace
plot_trace_dist
plot_trace_dist
2 changes: 2 additions & 0 deletions docs/source/api/visuals.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Data plotting elements
line
line_xy
line_x
scatter_xy
scatter_x
ecdf_line
hist
Expand All @@ -24,6 +25,7 @@ Data and axis annotating elements
:toctree: generated/

annotate_label
annotate_xy
point_estimate_text
labelled_title
labelled_y
Expand Down
26 changes: 26 additions & 0 deletions docs/source/gallery/inference_diagnostics/plot_ess_local.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
"""
# ESS Local plot

Facetted local ESS plot

---

:::{seealso}
API Documentation: {func}`~arviz_plots.plot_ess`
:::
"""

from arviz_base import load_arviz_data

import arviz_plots as azp

azp.style.use("arviz-clean")

data = load_arviz_data("centered_eight")
pc = azp.plot_ess(
data,
kind="local",
backend="none", # change to preferred backend
rug=True,
)
pc.show()
25 changes: 25 additions & 0 deletions docs/source/gallery/inference_diagnostics/plot_ess_models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
# ESS comparison plot

Full ESS (Either local or quantile) comparison between different models

---

:::{seealso}
API Documentation: {func}`~arviz_plots.plot_ess`
:::
"""

from arviz_base import load_arviz_data

import arviz_plots as azp

azp.style.use("arviz-clean")

c = load_arviz_data("centered_eight")
n = load_arviz_data("non_centered_eight")
pc = azp.plot_ess(
{"Centered": c, "Non Centered": n},
backend="none", # change to preferred backend
)
pc.show()
25 changes: 25 additions & 0 deletions docs/source/gallery/inference_diagnostics/plot_ess_quantile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"""
# ESS Quantile plot

Facetted quantile ESS plot

---

:::{seealso}
API Documentation: {func}`~arviz_plots.plot_ess`
:::
"""

from arviz_base import load_arviz_data

import arviz_plots as azp

azp.style.use("arviz-clean")

data = load_arviz_data("centered_eight")
pc = azp.plot_ess(
data,
kind="quantile",
backend="none", # change to preferred backend
)
pc.show()
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ classifiers = [
dynamic = ["version", "description"]
dependencies = [
"arviz-base==0.2",
"arviz-stats[xarray]==0.2",
"arviz-stats[xarray] @ git+https://github.com/arviz-devs/arviz-stats",
]

[tool.flit.module]
Expand Down
2 changes: 2 additions & 0 deletions src/arviz_plots/plots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .compareplot import plot_compare
from .distplot import plot_dist
from .essplot import plot_ess
from .forestplot import plot_forest
from .ridgeplot import plot_ridge
from .tracedistplot import plot_trace_dist
Expand All @@ -13,5 +14,6 @@
"plot_forest",
"plot_trace",
"plot_trace_dist",
"plot_ess",
"plot_ridge",
]
Loading