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

Custom CIs and/or printing all CI values via bat_report #381

Open
athoynilimanew opened this issue Aug 4, 2022 · 8 comments
Open

Custom CIs and/or printing all CI values via bat_report #381

athoynilimanew opened this issue Aug 4, 2022 · 8 comments

Comments

@athoynilimanew
Copy link

Hello!

I am a new user of BAT, and currently use bat_report(samples) for the credible intervals to be printed on screen. However, that only prints out the 68% CI, not the others.

Also, is it possible to change the default CIs ?

If you could add some functions to customise CI quantiles and print out all CIs on screen (all CIs shown in the marginalised plot), it could be of great help.

@oschulz
Copy link
Member

oschulz commented Aug 4, 2022

Yes, we can definitely make that configurable.

@oschulz
Copy link
Member

oschulz commented Aug 4, 2022

Until we make bat_report more configurable, you can use this workaround:

BAT.smallest_credible_intervals(smpls, nsigma_equivalent = 2)

with nsigma_equivalent set to 1, 2, or 3 to get smallest 68%, 95% or 99.7% intervals (you need the lastest BAT main branch). Not the BAT.smallest_credible_intervals is not part of BAT's stable API and subject to change.

@Lowerce
Copy link

Lowerce commented Nov 7, 2022

Are the above operations still available in BAT v2.0.5?

@oschulz
Copy link
Member

oschulz commented Nov 7, 2022

Sorry, no, this is currently only available on the main branch. We're preparing a BAT v3.0 release, but there's stiff some unfinished things we want to get done, hopefully quite soon. We have a few minor breaking changes compared to v2, and I don't want to rack up the major version count because we've missed one or two more changes that we still need to make. I recommend that you use the main branch for now.

@Lowerce
Copy link

Lowerce commented Nov 8, 2022

OK, I will try the version of main branch. Thank you.

@oschulz
Copy link
Member

oschulz commented Nov 8, 2022

Please let us know if you encounter any issues or need specific features or so.

@athoynilimanew sorry for the delay, btw - I'll get around to making CI configurable in reports, promise!

@Lowerce
Copy link

Lowerce commented Nov 17, 2022

I used bat_reportin jupyter notebook. But something like the following occurs:

\subsubsection{Sampling result}\begin{itemize} \item Total number of samples: 131237

\item Total weight of samples: 399997

\item Effective sample size: between 56123 and 56123

\end{itemize} \paragraph{Marginals}

ParseError: KaTeX parse error: No such environment: tabular at position 7: \begin{̲t̲a̲b̲u̲l̲a̲r̲}̲ {l | l | l | l…

It seems to be a problem with the format. How could I fix it?

BAT.smallest_credible_intervals worked just fine.

P.S. If the above two APIs can't set custom CI like 90% in the present dev version?

@oschulz
Copy link
Member

oschulz commented Aug 15, 2023

I'll get back on this now that BAT v3 is finally released.

BAT.smallest_credible_intervals works, it' just noch "official" yet.

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

3 participants