Questions tagged [edward]

Edward is a Python library for probabilistic modeling, inference, and criticism, built on TensorFlow.

Edward is a Python library for probabilistic modeling, inference, and criticism, built on TensorFlow. It is a testbed for fast experimentation and research with probabilistic models, ranging from classical hierarchical models on small data sets to complex deep probabilistic models on large data sets. Edward fuses three fields: Bayesian statistics and machine learning, deep learning, and probabilistic programming.

Website: http://edwardlib.org/

Source code: https://github.com/blei-lab/edward

24 questions
5
votes
0 answers

Trying to implement a Bayesian neural net with edward

I am trying to apply the Bayesian neural network for non-linear regression presented by Torsten Scholak at PyCon to some real world data and I am getting some weird results. The fit is ok up to a point and then just flatlines. Any ideas on what I am…
4
votes
0 answers

Discrete Bayesian network on Tensorflow Probability, Edward2, and Python

I have a simple Bayesian network: state / \ / \ V V signal_1 signal_2 with random variables "state", "signal_1", and "signal_2" with corresponding discrete values: Val(state) = {0, 1, 2, 3},…
2
votes
1 answer

Simple Hamiltonian Monte Carlo Example with TensorFlow Probability's Edward2

Edward example As Edward is deprecated and requires an older version of TensorFlow one can create a dedicated virtual environment for the following example $ python3 --version Python 3.6.8 $ python3 -m venv edward $ source…
2
votes
1 answer

Equivalent of `ed.copy` in `tensorflow_probability.edward2`

I am trying to change my code from edward to tensorflow_probability.edward2. The issue is that, whenever I define a posterior distribution, I use a_post = ed.copy(a, {u: qu}, scope='a_post') but .copy API seems no longer available: module…
alpaca
  • 1,211
  • 13
  • 23
2
votes
1 answer

MCMC Trace Plot in Edward

I'm using a Dirichlet Process Mixture Model (DPMM) to infer cluster assignments and cluster parameters on a synthetic dataset using Edward based on the following community post. I'm using GPU-accelerated Metropolis Hastings to learn the posterior…
Vadim Smolyakov
  • 1,187
  • 11
  • 24
1
vote
0 answers

cant build a sequential model of lstm cells

I had used a code for bayesian lstm by using edward2 library from a paper Bayesian Layers: A Module for Neural Network Uncertainty : lstm=ed.layers.LSTMCellReparameterization(8) output_layer=tf.keras.layers.Dense(4) def…
user12682643
1
vote
0 answers

How can I make Edward model with grouped countable features?

I'm trying to make clustering model with Edward or tensorflow probability about the data whose features are grouped and countable. The data is as below. {'data_point_1': [[0, 1], [1, 2], [3, 1], [2, 1]}, 'data_point_2': [[1, 3], [2, 8], [2, 2],…
Shuhei Kishi
  • 101
  • 2
  • 7
1
vote
0 answers

What tensorflow.exp(...) does in code sample from edward tutorial

I am new to edward and checking the tutorial about linear mixed effects (jupyter notebook can be found here) trying to understand the code. This question might be more related to me not understanding something ternsorflow though. the code in the…
ntg
  • 12,950
  • 7
  • 74
  • 95
1
vote
0 answers

How (re)sampling from my custom probability mass function with Edward or TensorFlow?

I collected some data, draw a histogram and did statical estimation using kernel density estimation, so I got my custom probability mass function. But I cannot resample from the function. So, it is estimable P(X=x) but cannot resample x ~ P(x). How…
H. Kazu
  • 23
  • 5
1
vote
1 answer

Unable to import distributions module from Tensorflow (Dockerized)

I'm running the official TF docker repo using the Jupyter UI on localhost. It seems that TF is working in general, as I am able to import it, but when trying to import the distributions module I get an error: print tf.__version__ import…
Evan Zamir
  • 8,059
  • 14
  • 56
  • 83
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
vote
0 answers

Verify that keras GaussianNoise is enabled at train time when using inference with edward

I would like to check if noise is truly added and used during training of my neural network. I therefore build my NN with keras like this: from keras.layers import Input from keras.layers.noise import GaussianNoise inp =…
whiletrue
  • 10,500
  • 6
  • 27
  • 47
1
vote
0 answers

Latent factor recovery with probabilistic matrix factorization using Edward

I implemented a probabilistic matrix factorization model (R = U'V) following the example in Edward's repo: # data U_true = np.random.randn(D, N) V_true = np.random.randn(D, M) R_true = np.dot(np.transpose(U_true), V_true) + np.random.normal(0, 0.1,…
charlesh
  • 11
  • 2
1
vote
0 answers

Error implementing Mixture of Gaussians in Edward Lib

I'm trying to code a simple Gaussian mixture in Edward. I follow the basics steps and tutorials. The code seems to be OK, but when I run it I get the following error: Received a label value of 1 which is outside the valid range of [0, 2). Label…
1
vote
1 answer

where is the location of class Normal in edward's source code?

When using edward, we always use from edward.models import Normal , but i didn't find the declaration of Normal in github anybody who can tell me where is it
Keith
  • 807
  • 7
  • 13
1
2