# Bayesian nonparametric modeling

**URL:** <https://discourse.mc-stan.org/t/bayesian-nonparametric-modeling/2674>\
**Category:** Modeling\
**Created:** [December 4, 2017, 2:03pm UTC](https://discourse.mc-stan.org/t/bayesian-nonparametric-modeling/2674 "2017-12-04T14:03:03Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Max\_Mantei](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/max_mantei/32/7912_2.png) [@Max\_Mantei](https://discourse.mc-stan.org/u/Max_Mantei)\
**Post date:** [December 5, 2017, 12:56pm UTC](https://discourse.mc-stan.org/t/bayesian-nonparametric-modeling/2674/2 "2017-12-05T12:56:38Z")

</div>

AFAIK the problem the two major problems with doing non-parametric stuff in Stan are that 1) it’s not possible to sample discrete parameters, and 2) Stan can not sample a “varying” number of parameters.

That being said, I read somewhere that people are overcoming these issues, for example by marginalizing out discrete parameters (1) or by for example set a very high number of clusters (2), which kind of capture in essence “going to infinity” and then regularize with priors (so that the arbitrary upper bound doesn’t actually matter).

---

_[View the full topic](https://discourse.mc-stan.org/t/bayesian-nonparametric-modeling/2674)._
