Which ecosystem to choose for teaching

I am in a bit stuck at the moment.
I’m relatively new to stan, but I want to incorporate it into my teaching.
However, I am not sure which ecosystem should I focus on.
My students are much more familiar with Python, and Python is something that the local work market wants.
On the other hand, a sheer amount of tools available in R is amazing. Are there even packages comparable to brms for python?
What would you recommend? Are advantages of easier interfaces to stan overweight the requirement of learning R?

I’ll be grateful for any suggestions.

3 Likes

right now the Python ecosystem lacks anything like BRMS - we’re working on it!

the Arviz package has some of the Bayesplot functionality for downstream visualization and analysis.

Aki just pointed me to “bambi” - GitHub - bambinos/bambi: BAyesian Model-Building Interface (Bambi) in Python. which has a syntax similar to lme4 and uses PyMc3 as a backend.

I’ve been working on CmdStanPy which is a lightweight wrapper around Stan - it’s feature complete but still in Beta - https://cmdstanpy.readthedocs.io/en/latest/ - there are corresponding notebooks here: https://github.com/stan-dev/cmdstanpy/tree/master/docs/notebooks

some of the Stan case studies are already written for PyStan - you could probably update these to use CmdStanPy and Arviz, and if you do these, we’ll be happy to add your version to the case studies page.

8 Likes

Thanks for pointing me in a right direction.

As the topic reactivated after 3 years, I just wanted to post, that I’ve chosen cmdstanpy. Main reason was that at the moment I started pystan was not available for Windows machines, and I have full scope of systems among my students. So far I am much more pleased with using it over my previous experiences with pystan.

The problem now is that I got bitten by an INLA bug, and this is only available in R ;-)

1 Like