Posts

Tensorflow for Statisticians (2)

Following my last post on using tensorflow for linear regression, in this post I am going to extend the scope to generalized linear models.

>>> import tensorflow as tf
>>> import tensorflow_probability as tfp
>>> tfd = tfp.distributions
>>> from tensorflow.keras import layers

Let us simulate some data first.