[Newbie] Numpyro with Levy/stable distribution?

Hi,
I’m new to Pyro and Numypro and I’m working through the examples and documentation of both.
I would like to replicate the Pyro example for levy stable model - time series http://pyro.ai/examples/stable.html with Numpyro. For Pyro the documentation for stable distribution is here http://docs.pyro.ai/en/stable/distributions.html#stable, but for Numpyro I couldn’t find a documentation for stable distribution http://num.pyro.ai/en/stable/distributions.html#continuous-distributions and I guess it’s not available until now.
May I ask you, if you could guide me, how I could work around it and replicate the example http://pyro.ai/examples/stable.html in Numpyro?
Thank you very much

Hi @muran, Stable distribution is pretty complicated to implement. I would suggest to mimic the Stochastic Volatility example in NumPyro.

If you want to port that stable example to NumPyro, you’ll need to port the implementation of Stable distribution, StableReparam reparameterizer, and probably also DiscreteCosineReparam first. Each of them will require a bunch of work so I won’t recommend porting them. In case you want, please ping me to review your work on this. It would be fun though. :slight_smile:

Hi @fehiepsi thank you for your response. I will first analyze and play with the example in Numpyro and compare the results with the example from Pyro (if I got it right, the Numypro example uses a StudentT distribution instead of a stable distribution to model the return itself).
I’m still pretty new to Pyro/Numypro, stable distributions and Pytorch. For now, I will not try porting the stable distribution to Numypro (maybe in the medium/long term, when I gained more knowledge, can better compare the benefits and most important when I’m able to do it)

Hi @muran, you might consider using a StudentT distribution rather than Stable. I was excited when we first added Stable inference to Pyro, but after many experiments @martinjankowiak and I failed to find examples where Stable was significantly more accurate than StudentT, and we found that Stable inference was always 2-4x more expensive than StudentT inference. That being said, I’d be interested if you have an prediction example where Pyro’s Stable is significantly more accurate than StudentT.

1 Like