Pyro vs Pymc? What are the difference between these Probabilistic Programming frameworks?

(Updated for 2022) Pyro is built on PyTorch. It has full MCMC, HMC and NUTS support. It has excellent documentation and few if any drawbacks that I’m aware of. PyMC was built on Theano which is now a largely dead framework, but has been revived by a project called Aesara. PyMC3 is now simply called … Read more

Import a module with parameter in python

there are various approaches to do so, here is just a silly and simple one: main.py “””A silly example – main supplies a parameter “”” import sys,os print os.path.basename(__file__)+”:Push it by: –myModuleParam “+str(123) sys.argv.append(‘–myModuleParam’) sys.argv.append(123) import module print os.path.basename(__file__)+”:Pushed my param:”+str(module.displayMyParam) module.py “””A silly example – module consumes parameter “”” import sys,os displayMyParam = ‘NotYetInitialized’ … Read more

Install anaconda library from a local source

To solve this, you need to download the tar file (even if using Windows) that the installer is trying to fetch and then use offline mode: Use this command (which will throw an error), to determine the file to be downloaded: >conda install -c https://conda.binstar.org/pymc pymc Fetching package metadata: SSL verification error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate … Read more

Highest Posterior Density Region and Central Credible Region

From my understanding “central credible region” is not any different from how confidence intervals are calculated; all you need is the inverse of cdf function at alpha/2 and 1-alpha/2; in scipy this is called ppf ( percentage point function ); so as for Gaussian posterior distribution: >>> from scipy.stats import norm >>> alpha = .05 … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)