betanalpha / jupyter_case_studies Goto Github PK
View Code? Open in Web Editor NEWInference case studies in jupyter
Inference case studies in jupyter
Hi,
When I installed pystan the first time I ran into problems with a missing stan_cache.
I solved it by simply changing the code in utils.py
But now I have installed on the institutes server (requested it). Again I meet the same problem, while using compile_model
:
No such file or directory: '/home/micmad/.stan_cache/cached-model-c4ed8c57c14f2eabbd4599b428df4a4c.pkl'
I do not have root access, making it hard to manually change the code. Is there a way to specify a location as your cache?
Thanks in advance
Michael
I could find the following functions in the case studies, I am wondering why they are not gathered in any package. So does there exist any Python package with similar diagnostic tools for PyStan?
https://github.com/betanalpha/jupyter_case_studies/blob/master/pystan_workflow/stan_utility.py
Do you think stan_utility
could be put to pypi?
This would enable users to pip install it. Otherwise this could be installable from git too. Just needs same structure as pypi thing (setup.py + some init)
(I still think all the updates here should go to pystan too).
This would enable you to pin down version and show it where these are used.
Hi, here are some comments for the stan_utility.py
.
Use from __future__ import division, print_function
for py2 compatibility
If division
is not imported all the division n/N
will result to 0.
In prints use formatter to control the number of digits (e.g. 2)
"{:.2f}%".format(n/N)
equals to
numpy.swapaxes(ef, 0, 1)
lines 48 and 49
ef = _by_chain(ef)
ef = ef.reshape(-1, len(ef[0][0]))
equals to
ef = ef.reshape(-1, ef.shape[-1], order='F')
no need to call extract()
fit.extract().keys() == fit.sim['pars_oi']
should this line save the result?
shaped[param_name] = shaped[param_name].reshape(*([-1] + dim))
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.