Module: tfp.glm

TensorFlow Probability GLM python package.

Defined in python/glm/__init__.py.

Classes

class Bernoulli: Bernoulli(probs=mean) where mean = sigmoid(matmul(X, weights)).

class BernoulliNormalCDF: Bernoulli(probs=mean) where

class CustomExponentialFamily: Constucts GLM from arbitrary distribution and inverse link function.

class ExponentialFamily: Specifies a mean-value parameterized exponential family.

class GammaExp: Gamma(concentration=1, rate=1 / mean) where

class GammaSoftplus: Gamma(concentration=1, rate=1 / mean) where

class LogNormal: LogNormal(loc=log(mean) - log(2) / 2, scale=sqrt(log(2))) where

class LogNormalSoftplus: LogNormal(loc=log(mean) - log(2) / 2, scale=sqrt(log(2)))

class Normal: Normal(loc=mean, scale=1) where mean = matmul(X, weights).

class NormalReciprocal: Normal(loc=mean, scale=1) where mean = 1 / matmul(X, weights).

class Poisson: Poisson(rate=mean) where mean = exp(matmul(X, weights)).

class PoissonSoftplus: Poisson(rate=mean) where mean = softplus(matmul(X, weights)).

Functions

convergence_criteria_small_relative_norm_weights_change(...): Returns Python callable which indicates fitting procedure has converged.

fit(...): Runs multiple Fisher scoring steps.

fit_one_step(...): Runs one step of Fisher scoring.

fit_sparse(...): Fits a GLM using coordinate-wise FIM-informed proximal gradient descent.

fit_sparse_one_step(...): One step of (the outer loop of) the GLM fitting algorithm.