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

Refactor az.plot_bf to Separate Bayes Factor Plotting Logic into the arviz-plots Repository #114

Open
PiyushPanwarFST opened this issue Jan 21, 2025 · 2 comments

Comments

@PiyushPanwarFST
Copy link

Currently, the logic for computing and plotting Bayes Factors resides within the main repository. To better align with a modular design and enhance code maintainability, I propose moving the functionality for Bayes Factor plotting to the arviz-plots repository. This separation will ensure better organization and maintainability by decoupling the core computation logic from the plotting logic.

Proposed Refactor Benefits

Separation of Concerns: Clearly separates the computation (az.bayes_factor) from the visualization az.plot_bf.
Focused Repositories: Makes the arviz-plots repository dedicated to visualization tasks.
Simplified Dependencies: Reduces dependencies for users who only require the visualization logic.

Progress

The computation logic has already been separated into the arviz-stats repository as discussed in [#46]
I am now working on the separation of the plotting functionality into the arviz-plots repository.

This issue was previously discussed in arviz Issue #2402, and I am continuing the work based on that discussion.

@PiyushPanwarFST
Copy link
Author

To define the functionality for plotting the Bayes factor function, I need these functions, but they are not available in the arviz-plots repository. These functions are available in the main repository of arviz. Do I need to initialize them again in the arviz-plots repository? If not, how can I access that functionality?

from ..data.utils import extract
from .plot_utils import get_plotting_function
from ..stats import bayes_factor

@aloctavodia
Copy link
Contributor

Import them from arviz-base or arviz-stats or arviz-plots itself. Also please become familiar with how arviz-plots works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants