Questions tagged [pyro.ai]

Python-based probabilistic programming framework developed by Uber AI Labs. It is a flexible, scalable deep probabilistic programming library built on PyTorch.

Pyro.ai is a "Deep Universal Probabilistic Programming" framework.

From the About-page of Pyro:

Pyro is a universal probabilistic programming language (PPL) written in Python and supported by PyTorch on the backend. Pyro enables flexible and expressive deep probabilistic modeling, unifying the best of modern deep learning and Bayesian modeling. It was designed with these key principles:

Universal: Pyro can represent any computable probability distribution.
Scalable: Pyro scales to large data sets with little overhead.
Minimal: Pyro is implemented with a small core of powerful, composable abstractions.
Flexible: Pyro aims for automation when you want it, control when you need it.

GitHub Repository

As of October 2018, it is in beta release.

20 questions
31
votes
2 answers

Pyro vs Pymc? What are the difference between these Probabilistic Programming frameworks?

I used 'Anglican' which is based on Clojure, and I think that is not good for me. Bad documents and a too small community to find help. Also, I still can't get familiar with the Scheme-based languages. So I want to change the language to something…
MinKi Jo
  • 457
  • 1
  • 5
  • 10
11
votes
1 answer

NumPyro vs Pyro: Why is former 100x faster and when should I use the latter?

From Pytorch-Pyro's website: We’re excited to announce the release of NumPyro, a NumPy-backed Pyro using JAX for automatic differentiation and JIT compilation, with over 100x speedup for HMC and NUTS! My questions: Where is the performance gain…
7
votes
0 answers

Sampling from a joint distribution in Pyro

I understand how to sample from multidimensional categorical, or multivariate normal (with dependence within each column). For example, for a multivariate categorical, this can be done as below: import pyro as p import pyro.distributions as d import…
alpaca
  • 1,211
  • 13
  • 23
3
votes
1 answer

numpyro.render_model cannot be found

I am working with the Bayesian models in NumPyro. It is a relatively new library. I tried to visualize my model by following the Numpyro manual: http://num.pyro.ai/en/latest/tutorials/model_rendering.html My code returns: "module 'numpyro' has no…
3
votes
2 answers

Different access methods to Pyro Paramstore give different results

I am following the Pyro introductory tutorial in forecasting, and trying to access the learned parameters after training the model, I get different results using different access methods for some of them (while getting identical results for…
desertnaut
  • 57,590
  • 26
  • 140
  • 166
3
votes
0 answers

Pyro - Likelihood function and sampling dimension

I am learning Pyro and I find the dimensions confusing, despite the rich and detailed documentation This is the sketch of my model: DATA_SIZE = 1000 simulated_daily_demand = torch.distributions.Beta(torch.tensor(2.0),…
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
2
votes
0 answers

Getting an error in svi step due to to a multiclass distribution in sample using pyro and pytorch

I'm working on a causal variational autoencoder which works with class segmentation masks, class labels and causality(0 or 1) as the inputs. I'm getting an error when working with batch sizes more than 1 due to the svi step. I'm using a bernoulling…
2
votes
0 answers

How to build Directed acyclic graph using Pyro in python?

Can any one halp me how to use Pyro to build directed acyclic graph and calculate inference? Let consider this graph: A---> B <-----C A successful probability 0.6 and C successful probability 0.7 Can we calculate P(A,B,C) and P(B|A,C) using Pyro in…
1
vote
1 answer

Problem in Implementing a Graphical Model Using Pyro

I am trying to implement this graphical model using Pyro: My implementation is: def model(data): p = pyro.sample('p', dist.Beta(1, 1)) label_axis = pyro.plate("label_axis", data.shape[0], dim=-3) f_axis = pyro.plate("f_axis",…
Arash Khoeini
  • 1,276
  • 1
  • 11
  • 17
1
vote
1 answer

A JAX custom VJP function for multiple input variable does not work for NumPyro/HMC-NUTS

I am trying to use a custom VJP (vector-Jacobian product) function as a model for a HMC-NUTS in numpyro. I was able to make a single variable function that works for HMC-NUTS as follows: import jax.numpy as jnp from jax import…
1
vote
1 answer

Pyro changes dimension of Discrete latent variable when using NUTS (MCMC) sampler

Thanks for taking time to read my issue as given below. The issue I need help with is that the dimensions of my Binomial distribution output changes (automatically) during the second iteration when I run the model using NUTS sampler. Because of this…
rkmalaiya
  • 498
  • 1
  • 5
  • 15
1
vote
2 answers

Python PyTorch Pyro - Multivariate Distributions

How does one sample a multivariate distribution in Pyro? I just want a (M, N) Beta distribution, but the following doesn't work: impor torch import pyro with pyro.plate("theta_plate", M): theta = pyro.sample("theta", …
Rylan Schaeffer
  • 1,945
  • 2
  • 28
  • 50
1
vote
1 answer

Kalman Filterin with changing known variance over time?

I have a simple Kalman model: y_1_t = (1 + phi) * alpha_t + e_1_t y_2_t = (1 - phi) * alpha_t + e_2_t alpha_t+1 = alpha_t + s_t Now I know the variances over time for e_1_t and e_2_t - they are not constant. Is there a python package that…
denniz
  • 13
  • 4
1
vote
1 answer

Pyro change AutodiagonalNormal settings

I use pyro-ppl 3.0 for probabilistic programming. When I go through the tutorial on Bayesian regression. I used AutoGuide and pyro.random_module to transfer a normal feed-forward network to bayesian network. # linear regression class…
Yikuan
  • 11
  • 1
1
vote
2 answers

PyMC3/Edward/Pyro on Spark?

Has anyone tried using a python probabilistic programming library with Spark? Or does anyone have a good idea of what it would take? I have a feeling Edward would be simplest because there are already tools connecting Tensorflow and Spark, but…
Nick Resnick
  • 591
  • 1
  • 5
  • 14
1
2