# Sharing

**URL:** https://discourse.pymc.io/c/sharing/5.md

[Latest](https://discourse.pymc.io/latest.md) · [Categories](https://discourse.pymc.io/categories.md) · [Tags](https://discourse.pymc.io/tags.md)

---

## [About the Sharing category](https://discourse.pymc.io/t/about-the-sharing-category/16)

<div class="topic-metadata">

**Author:** [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Replies:** 0

</div>

Here you can find materials for learning Bayesian Statistics, Probabilistic Programming, and related mathematics. Feel free to share codes, videos, papers, books, lecture notes, etc. You can expect materials on the fol…

---

## [Sampling PyMC models in JupyterLite with a WebAssembly backend for PyTensor](https://discourse.pymc.io/t/sampling-pymc-models-in-jupyterlite-with-a-webassembly-backend-for-pytensor/17946)

<div class="topic-metadata">

**Author:** [@habakan](https://discourse.pymc.io/u/habakan)\
**Replies:** 0\
**Last updated:** [September 28, 2026, 1:48pm UTC](https://discourse.pymc.io/t/sampling-pymc-models-in-jupyterlite-with-a-webassembly-backend-for-pytensor/17946 "2026-09-28T13:48:14Z")

</div>

Hi all. PyMC installs on standard Pyodide (the Python that JupyterLite and marimo run in the page), but there PyTensor has no C compiler, so every logp and gradient runs on the Python linker. On a logistic regression …

---

## [Pymc\_forecast — a new Bayesian time-series forecasting toolkit for PyMC](https://discourse.pymc.io/t/pymc-forecast-a-new-bayesian-time-series-forecasting-toolkit-for-pymc/17873)

<div class="topic-metadata">

**Author:** [@twiecki](https://discourse.pymc.io/u/twiecki)\
**Replies:** 1\
**Last updated:** [July 17, 2026, 6:40pm UTC](https://discourse.pymc.io/t/pymc-forecast-a-new-bayesian-time-series-forecasting-toolkit-for-pymc/17873 "2026-07-17T18:40:17Z")

</div>

Hi all, we just released pymc\_forecast, a toolkit for Bayesian time-series forecasting with PyMC. The philosophy: you write the generative model, the package handles everything around it — the train/forecast plumbing, i…

---

## [Hidden Markov Models in PyMC: marginalize and recover a DiscreteMarkovChain](https://discourse.pymc.io/t/hidden-markov-models-in-pymc-marginalize-and-recover-a-discretemarkovchain/17871)

<div class="topic-metadata">

**Author:** [@ricardoV94](https://discourse.pymc.io/u/ricardoV94)\
**Replies:** 0\
**Last updated:** [July 13, 2026, 6:45am UTC](https://discourse.pymc.io/t/hidden-markov-models-in-pymc-marginalize-and-recover-a-discretemarkovchain/17871 "2026-07-13T06:45:25Z")

</div>

Latest PyMC example: Hidden Markov Models in PyMC: marginalize and recover a DiscreteMarkovChain — PyMC example gallery

---

## [Tidydraws: new package released](https://discourse.pymc.io/t/tidydraws-new-package-released/17862)

<div class="topic-metadata">

**Author:** [@drbenvincent](https://discourse.pymc.io/u/drbenvincent)\
**Replies:** 2\
**Last updated:** [June 30, 2026, 3:48am UTC](https://discourse.pymc.io/t/tidydraws-new-package-released/17862 "2026-06-30T03:48:47Z")

</div>

I’ve made a python/PyMC port of tidybayes. More docs examples are incoming. Requests for additional geoms to be made soon to plotnine and lets-plot. But hopefully already very usable. Happy to get any feedback via issue…

---

## [Alchemize: Transpile PyMC to Rust for 3-7x speed-up](https://discourse.pymc.io/t/alchemize-transpile-pymc-to-rust-for-3-7x-speed-up/17709)

<div class="topic-metadata">

**Author:** [@twiecki](https://discourse.pymc.io/u/twiecki)\
**Replies:** 6\
**Last updated:** [May 16, 2026, 1:54am UTC](https://discourse.pymc.io/t/alchemize-transpile-pymc-to-rust-for-3-7x-speed-up/17709 "2026-05-16T01:54:01Z")

</div>

Excited to release Alchemize: It takes a PyMC model and emits optimized Rust. But the interesting part is what’s not in the codebase: a compiler. The biggest complexity in PyMC hides in PyTensor: the computational libra…

---

## [Local sensitivity checks for PyMC posterior predictions (exploratory notebook)](https://discourse.pymc.io/t/local-sensitivity-checks-for-pymc-posterior-predictions-exploratory-notebook/17651)

<div class="topic-metadata">

**Author:** [@Vikram](https://discourse.pymc.io/u/Vikram)\
**Replies:** 2\
**Last updated:** [March 30, 2026, 6:47pm UTC](https://discourse.pymc.io/t/local-sensitivity-checks-for-pymc-posterior-predictions-exploratory-notebook/17651 "2026-03-30T18:47:54Z")

</div>

Hi everyone, This discussion is in reference to the PyMC Extras issue on local sensitivity checks for posterior predictions (here). Following the suggestion in that thread, I’ve put together a small exploratory noteboo…

---

## [First Bayesian regression in PyMC – feedback on model structure & posterior predictive](https://discourse.pymc.io/t/first-bayesian-regression-in-pymc-feedback-on-model-structure-posterior-predictive/17525)

<div class="topic-metadata">

**Author:** [@Adishree](https://discourse.pymc.io/u/Adishree)\
**Replies:** 0\
**Last updated:** [January 16, 2026, 12:20am UTC](https://discourse.pymc.io/t/first-bayesian-regression-in-pymc-feedback-on-model-structure-posterior-predictive/17525 "2026-01-16T00:20:50Z")

</div>

Hello everyone, My name is adishree I’m new to PyMC and Bayesian modeling, and I’ve just built my first Bayesian regression model to predict exam scores based on study hours and midterm performance. I’d really appreciat…

---

## [Golf Putting Example in marimo notebook](https://discourse.pymc.io/t/golf-putting-example-in-marimo-notebook/17484)

<div class="topic-metadata">

**Author:** [@wdeanHPA](https://discourse.pymc.io/u/wdeanHPA)\
**Replies:** 0\
**Last updated:** [December 12, 2025, 10:02pm UTC](https://discourse.pymc.io/t/golf-putting-example-in-marimo-notebook/17484 "2025-12-12T22:02:05Z")

</div>

The Golf Putting case study by Andrew Gelman has been one of my favorite PyMC examples for years now so I’ve ported a version into marimo. Run it yourself in molab here: Golf Putting - molab See source code here: Gi…

---

## [The ludic fallacy and decision making in an uncertain world](https://discourse.pymc.io/t/the-ludic-fallacy-and-decision-making-in-an-uncertain-world/17345)

<div class="topic-metadata">

**Author:** [@Juan\_Martinez](https://discourse.pymc.io/u/Juan_Martinez)\
**Replies:** 4\
**Last updated:** [September 27, 2025, 4:46pm UTC](https://discourse.pymc.io/t/the-ludic-fallacy-and-decision-making-in-an-uncertain-world/17345 "2025-09-27T16:46:29Z")

</div>

Hi all, I just made a post discussing the ludic fallacy, which can also serve to make a non-technical introduction to Bayesian inference. Taleb explains the fallacy as “basing studies of chance on the narrow world of …

---

## [Introduction: Saqib – Aspiring Contributor & GSoC 2026 Student](https://discourse.pymc.io/t/introduction-saqib-aspiring-contributor-gsoc-2026-student/17337)

<div class="topic-metadata">

**Author:** [@MALIKSAQIB786](https://discourse.pymc.io/u/MALIKSAQIB786)\
**Replies:** 0\
**Last updated:** [September 16, 2025, 12:17pm UTC](https://discourse.pymc.io/t/introduction-saqib-aspiring-contributor-gsoc-2026-student/17337 "2025-09-16T12:17:25Z")

</div>

Hi everyone :waving\_hand:, I’m Saqib. I work with Python, ML, and feature engineering, and I’m learning Bayesian methods. I just joined because I’d love to contribute to PyMC, especially with GSoC 2026 in mind. Could s…

---

## [CustomDist infers logp expression from random generating graph](https://discourse.pymc.io/t/customdist-infers-logp-expression-from-random-generating-graph/17316)

<div class="topic-metadata">

**Author:** [@bob-carpenter](https://discourse.pymc.io/u/bob-carpenter)\
**Replies:** 5\
**Last updated:** [September 5, 2025, 4:18pm UTC](https://discourse.pymc.io/t/customdist-infers-logp-expression-from-random-generating-graph/17316 "2025-09-05T16:18:33Z")

</div>

Am I understanding this right—CustomDist can just take a function for generating random variables and turn that into a density somehow? I couldn’t quite follow the documentation for dist argument of CustomDist, because…

---

## [Leveraging the State Space module for tracking/forecasting hurricane trajectories](https://discourse.pymc.io/t/leveraging-the-state-space-module-for-tracking-forecasting-hurricane-trajectories/17164)

<div class="topic-metadata">

**Author:** [@Dekermanjian](https://discourse.pymc.io/u/Dekermanjian)\
**Replies:** 0\
**Last updated:** [July 2, 2025, 4:24pm UTC](https://discourse.pymc.io/t/leveraging-the-state-space-module-for-tracking-forecasting-hurricane-trajectories/17164 "2025-07-02T16:24:05Z")

</div>

I’m excited to share this case-study that highlights how you can build a custom state space model using the pymc-extras state space module. In the example, we walkthrough building three models with added complexity: N…

---

## [Repository for making PyMC environment](https://discourse.pymc.io/t/repository-for-making-pymc-environment/16969)

<div class="topic-metadata">

**Author:** [@opherdonchin](https://discourse.pymc.io/u/opherdonchin)\
**Replies:** 1\
**Last updated:** [May 5, 2025, 8:07am UTC](https://discourse.pymc.io/t/repository-for-making-pymc-environment/16969 "2025-05-05T08:07:53Z")

</div>

I made a repository with instructions and environment definition files for creating a PyMC-ready environment. The instrucitons cover installation for use in VS Code, PyCharm, or Spyder (they are, sadly, all different). T…

---

## [Reproducibility & Scalability with PyMC](https://discourse.pymc.io/t/reproducibility-scalability-with-pymc/16883)

<div class="topic-metadata">

**Author:** [@Dekermanjian](https://discourse.pymc.io/u/Dekermanjian)\
**Replies:** 2\
**Last updated:** [April 17, 2025, 2:43pm UTC](https://discourse.pymc.io/t/reproducibility-scalability-with-pymc/16883 "2025-04-17T14:43:12Z")

</div>

Hello, PyMC community! I wanted to share with you my first series ‘Reproducibility & Scalability’ on my personal blog. In four sub-posts I go over: How I setup my personal projects using Kedro a framework that aims to…

---

## [Business question: What are your practices for using the BG/NBD model in terms of size of training, and how you scale to larger datasets?](https://discourse.pymc.io/t/business-question-what-are-your-practices-for-using-the-bg-nbd-model-in-terms-of-size-of-training-and-how-you-scale-to-larger-datasets/16512)

<div class="topic-metadata">

**Author:** [@jeremyloscheider](https://discourse.pymc.io/u/jeremyloscheider)\
**Replies:** 9\
**Last updated:** [February 17, 2025, 6:37pm UTC](https://discourse.pymc.io/t/business-question-what-are-your-practices-for-using-the-bg-nbd-model-in-terms-of-size-of-training-and-how-you-scale-to-larger-datasets/16512 "2025-02-17T18:37:44Z")

</div>

In your experience as users, how do you approach estimating attrition, retention and projected spend for large datasets of customers? How big have your use cases been? I ask because in the examples I’ve seen, the datase…

---

## [A detailed comparison between PyMC and Stan syntax and approaches to modelling](https://discourse.pymc.io/t/a-detailed-comparison-between-pymc-and-stan-syntax-and-approaches-to-modelling/16430)

<div class="topic-metadata">

**Author:** [@ricardoV94](https://discourse.pymc.io/u/ricardoV94)\
**Replies:** 1\
**Last updated:** [January 23, 2025, 6:03pm UTC](https://discourse.pymc.io/t/a-detailed-comparison-between-pymc-and-stan-syntax-and-approaches-to-modelling/16430 "2025-01-23T18:03:07Z")

</div>

I wrote a small notebook that tries to distill the similarities/differences between PyMC and Stan. Google colab Github gist It was motivated some recent discussions. Feedback / questions appreciated!

---

## [Modeling US Presidential Election w/ Polling](https://discourse.pymc.io/t/modeling-us-presidential-election-w-polling/14766)

<div class="topic-metadata">

**Author:** [@awalters](https://discourse.pymc.io/u/awalters)\
**Replies:** 10\
**Last updated:** [January 17, 2025, 2:10am UTC](https://discourse.pymc.io/t/modeling-us-presidential-election-w-polling/14766 "2025-01-17T02:10:51Z")

</div>

Hi all, I built a model for the current US presidential election using PyMC. Here’s a presentation summarizing the findings with nice graphics, the 2024 two-way model, the 2024 three-way model, and backtesting with the 2…

---

## [Binomial probit regression, sample code](https://discourse.pymc.io/t/binomial-probit-regression-sample-code/16172)

<div class="topic-metadata">

**Author:** [@cosine](https://discourse.pymc.io/u/cosine)\
**Replies:** 2\
**Last updated:** [November 25, 2024, 11:20am UTC](https://discourse.pymc.io/t/binomial-probit-regression-sample-code/16172 "2024-11-25T11:20:45Z")

</div>

Hi Here is sample code to do probit regression for Binomial or Bernoulli processes. Based of python - Probit regression using PyMC 3 - Stack Overflow Updated to use pytensor import pymc as pm import pytensor from pyt…

---

## [Blog: The right way to do predictive checks with observation-level random effects](https://discourse.pymc.io/t/blog-the-right-way-to-do-predictive-checks-with-observation-level-random-effects/16131)

<div class="topic-metadata">

**Author:** [@ErikRingen](https://discourse.pymc.io/u/ErikRingen)\
**Replies:** 2\
**Last updated:** [November 21, 2024, 11:15am UTC](https://discourse.pymc.io/t/blog-the-right-way-to-do-predictive-checks-with-observation-level-random-effects/16131 "2024-11-21T11:15:01Z")

</div>

I’ve released a short blog about performing posterior predictive checks for models with observation-level random effects (OLREs) (e.g., for over-dispersed counts). This has come up a few times for me while consulting, so…

---

## [New experimental sampling algorithm: Fisher HMC in nutpie for pymc and stan models](https://discourse.pymc.io/t/new-experimental-sampling-algorithm-fisher-hmc-in-nutpie-for-pymc-and-stan-models/16114)

<div class="topic-metadata">

**Author:** [@aseyboldt](https://discourse.pymc.io/u/aseyboldt)\
**Replies:** 5\
**Last updated:** [November 18, 2024, 4:27pm UTC](https://discourse.pymc.io/t/new-experimental-sampling-algorithm-fisher-hmc-in-nutpie-for-pymc-and-stan-models/16114 "2024-11-18T16:27:22Z")

</div>

I’m excited to introduce an experimental implementation of Fisher-Adapted Hamiltonian Monte Carlo (HMC) using normalizing flows to replace the traditional mass matrix. This new method can increase sampling efficiency, es…

---

## [New sampler library: nutpie](https://discourse.pymc.io/t/new-sampler-library-nutpie/9765)

<div class="topic-metadata">

**Author:** [@aseyboldt](https://discourse.pymc.io/u/aseyboldt)\
**Replies:** 6\
**Last updated:** [October 30, 2024, 1:46am UTC](https://discourse.pymc.io/t/new-sampler-library-nutpie/9765 "2024-10-30T01:46:41Z")

</div>

I would like to announce a new sampler library that can sample from pymc and stan models using NUTS: nutpie. At least in my benchmarks it currently is the fastest CPU based sampler implementing NUTS. It compiles logp g…

---

## [Categorical BART with Out of Sample Predictions](https://discourse.pymc.io/t/categorical-bart-with-out-of-sample-predictions/15136)

<div class="topic-metadata">

**Author:** [@9f0sdau90](https://discourse.pymc.io/u/9f0sdau90)\
**Replies:** 1\
**Last updated:** [October 11, 2024, 9:24am UTC](https://discourse.pymc.io/t/categorical-bart-with-out-of-sample-predictions/15136 "2024-10-11T09:24:22Z")

</div>

I’ve been looking at building a categorical BART model which will allow for out of sampling predictions on a test set larger than the training dataset. I’ve written up a toy example to do this that draws on the posts of…

---

## [If you struggle with priors, please try Preliz](https://discourse.pymc.io/t/if-you-struggle-with-priors-please-try-preliz/12488)

<div class="topic-metadata">

**Author:** [@zweli](https://discourse.pymc.io/u/zweli)\
**Replies:** 1\
**Last updated:** [June 25, 2024, 8:48pm UTC](https://discourse.pymc.io/t/if-you-struggle-with-priors-please-try-preliz/12488 "2024-06-25T20:48:35Z")

</div>

I am amazed by the thoughtfulness of the Arviz/PYMC devs. I struggle with priors sometimes, although I have gotten better over time. It is still a work-on for me. Usually I muck around with the pymc random number generat…

---

## [PyMC and Cell Biology](https://discourse.pymc.io/t/pymc-and-cell-biology/14185)

<div class="topic-metadata">

**Author:** [@gil\_kanfer](https://discourse.pymc.io/u/gil_kanfer)\
**Replies:** 3\
**Last updated:** [June 17, 2024, 6:18pm UTC](https://discourse.pymc.io/t/pymc-and-cell-biology/14185 "2024-06-17T18:18:59Z")

</div>

Hello to the great PyMC community, I’ve written two blog posts aimed at enhancing the application of PyMC probabilistic programming in cell biology analysis. The first explores building PyMC models, and the second criti…

---

## [New distribution for PyMC: alpha-stable family \[beta\]](https://discourse.pymc.io/t/new-distribution-for-pymc-alpha-stable-family-beta/14398)

<div class="topic-metadata">

**Author:** [@tjhunter](https://discourse.pymc.io/u/tjhunter)\
**Replies:** 5\
**Last updated:** [May 28, 2024, 8:51am UTC](https://discourse.pymc.io/t/new-distribution-for-pymc-alpha-stable-family-beta/14398 "2024-05-28T08:51:50Z")

</div>

For the folks who need robust estimation, I am excited to release a first public version of levy-stable-jax, a package for 1-dimensional alpha-stable distributions. These distributions generalize Gaussian distributions t…

---

## [Adaptive MC w/ normalizing flows](https://discourse.pymc.io/t/adaptive-mc-w-normalizing-flows/10869)

<div class="topic-metadata">

**Author:** [@maedoc](https://discourse.pymc.io/u/maedoc)\
**Replies:** 5\
**Last updated:** [May 3, 2024, 8:27pm UTC](https://discourse.pymc.io/t/adaptive-mc-w-normalizing-flows/10869 "2024-05-03T20:27:32Z")

</div>

New paper turned up on PNAS about normalizing flows in Monte Carlo, https://www.pnas.org/doi/epdf/10.1073/pnas.2109420119 GitHub - marylou-gabrie/flonaco (pytorch impl) May be of interest?

---

## [More Monty Hall](https://discourse.pymc.io/t/more-monty-hall/14333)

<div class="topic-metadata">

**Author:** [@amoynahan](https://discourse.pymc.io/u/amoynahan)\
**Replies:** 4\
**Last updated:** [April 25, 2024, 12:00pm UTC](https://discourse.pymc.io/t/more-monty-hall/14333 "2024-04-25T12:00:37Z")

</div>

Just having some fun with the Monty Hall problem. The question comes down to as a contestant do you switch or not. The code below computes the probabilities of winning if you switch or say with your original guess. i…

---

## [Introducing bayeux](https://discourse.pymc.io/t/introducing-bayeux/13624)

<div class="topic-metadata">

**Author:** [@colcarroll](https://discourse.pymc.io/u/colcarroll)\
**Replies:** 9\
**Last updated:** [April 10, 2024, 1:08pm UTC](https://discourse.pymc.io/t/introducing-bayeux/13624 "2024-04-10T13:08:19Z")

</div>

Dear all – Happy to release a library for doing inference in JAX. It is ready to go as of ~20 minutes ago with (most) PyMC models. Check out this quickstart colab to jump right in (requires a recent version of PyMC), rea…

---

## [I created a PyMC GPT on OpenAI!](https://discourse.pymc.io/t/i-created-a-pymc-gpt-on-openai/13612)

<div class="topic-metadata">

**Author:** [@ulfaslak](https://discourse.pymc.io/u/ulfaslak)\
**Replies:** 10\
**Last updated:** [February 27, 2024, 1:54pm UTC](https://discourse.pymc.io/t/i-created-a-pymc-gpt-on-openai/13612 "2024-02-27T13:54:56Z")

</div>

As most do these days, I run most simple problems by ChatGPT to code faster. It’s great for boilerplate stuff, but it produces dangerous hallucinations when you start asking questions that require knowledge of framework …

[Next page](https://discourse.pymc.io/c/sharing/5.md?page=1)
