betanalpha / mcmc_diagnostics Goto Github PK
View Code? Open in Web Editor NEWMarkov chain Monte Carlo general, and Hamiltonian Monte Carlo specific, diagnostics for Stan
License: BSD 3-Clause "New" or "Revised" License
Markov chain Monte Carlo general, and Hamiltonian Monte Carlo specific, diagnostics for Stan
License: BSD 3-Clause "New" or "Revised" License
Howdy, really appreciate having these diagnostics available. I am a cmdstanpy
user and found it pretty straightforward to translate over the extract_
functions to be compatible.
While going through the code, I thought there were a few areas that could be improved. Some initial thoughts:
NaN
that should probably be a np.NaN
, etc. Didn't hit any branches that caused errors when I ran the diagnostics myself, but either way those fixes would be easy.extract_*
functions, this could be as simple as implementing these functions for both the stan.StanFit
objects and the cmdstanpy.stanfit.mcmc.CmdStanMCMC
objects. This wouldn't be much work and would make it for any Python Stan users to take advantage of this diagnostic code.pip install mcmc-diagnostics
or whatever the name should be and quickly incorporate these diagnostics into their workflow. I know this repo has a mix of R, PyStan2, PyStan3 implementations as well as documentation, so I'm not sure exactly if you'd want to separate things out or not.With all of these suggestions, I would be happy to work on implementing them if you are at all interested in doing so. Personally, I think it would be great to have a diagnostic utility like as something that can be easily incorporated into one's workflow.
If you're interested in pull requests or have any particular desires for future direction here, I'd be interested in hearing about them.
I think the n
variable should be changed to c
in this row, leading to:
cat(sprintf('Chain %s: E-FMI = %s.\n', c, numer / denom))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.