Rliesel vs. Pure Python #155
Replies: 2 comments
-
Hi @liesel-groupie, thanks for sharing your code! 🎉 Awesome that you are using pure-Python liesel 😊 Do you have a theory why the sampling behavior of the R-coded and the Python-coded models is different? Without having gone through your code line-by-line, I would expect that they are the same model and therefore should behave the same way in sampling. What I found sometimes helps to make sampling more efficient is splitting up the sampling of regression coefficients for smooth functions into blocks. Then you would have one block for each function. You can see an example for this in the Comparing samplers tutorial (NUTS sampler). As a side note: If you find the time, the showcase could benefit from just a few lines of verbal commentary on what is achieved in the individual code blocks. That would help readers understand what is going on. |
Beta Was this translation helpful? Give feedback.
-
If your primary focus is statistical analysis and visualization, and you're working in a field where R is commonly used (like academia or certain areas of industry), R might be a good choice. If you're looking for a more versatile language that can be applied to various domains (including statistics and data science), and you want to explore machine learning and AI, Python might be a better fit. |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have just discovered this nice discussion category. Actually I do not think you need to provide more tutorials. You can refer to discussions here and people could post some example codes? For example I had the same issue @Seb-Lorek with the rank not being a model node (and changed the gibbs sampler function, but now there is no need for this anymore).
So let me do a first step. I started with rliesel and now switched to pure Python. In the following I want to provide some code for both using an additive model with a linear effect and a P-Spline. The results are more or less the same (although the pure python sampling runs a lot into the maximum tree depth...):
Beta Was this translation helpful? Give feedback.
All reactions