# Using GEV in PyMC v4

**URL:** <https://discourse.pymc.io/t/using-gev-in-pymc-v4/9224>\
**Category:** v5\
**Tags:** development\
**Created:** [April 18, 2022, 10:33am UTC](https://discourse.pymc.io/t/using-gev-in-pymc-v4/9224 "2022-04-18T10:33:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarryS](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/harrys/32/5061_2.png) [@HarryS](https://discourse.pymc.io/u/HarryS)\
**Post date:** [April 18, 2022, 10:33am UTC](https://discourse.pymc.io/t/using-gev-in-pymc-v4/9224/1 "2022-04-18T10:33:28Z")

</div>

I would like use the generalized extreme value distribution in PyMC v4. This distribution is available in PyMC3, but for v4 I would need to create a custom distribution and use `pm.DensityDist`.

I am struggling to work out how to create a custom distribution in PyMC4 and I can’t find any working example notebooks.

Please could either:  
a) `pm.GenExtreme()` get ported into PyMC4  
b) An example notebook be made that shows how to create and use custom distributions in PyMC4.

Many thanks,  
Harry

---

<div class="post-metadata">

**Author:** ![cluhmann](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/cluhmann/32/3083_2.png) [@cluhmann](https://discourse.pymc.io/u/cluhmann)\
**Post date:** [April 18, 2022, 10:02pm UTC](https://discourse.pymc.io/t/using-gev-in-pymc-v4/9224/2 "2022-04-18T22:02:28Z")

</div>

It looks like that distribution has been moved to the [pymc experimental package](https://github.com/pymc-devs/pymc-experimental) and that development [is ongoing](https://github.com/pymc-devs/pymc-experimental/pull/4), including work on [a notebook](https://github.com/pymc-devs/pymc-examples/pull/241) illustrating its use. If you need this functionality, I might chime in on one of those issues.
