infergo: bitbucket.org/dtolpin/infergo/dist Index | Files | Directories

package dist

import "bitbucket.org/dtolpin/infergo/dist"

Package dist provides differentiatable distribution models. The package is automatically differentiated by deriv during build.

Index

Package Files

dist.go

Variables

var Beta beta

Beta distribution, singleton instance.

var D d

D is a singletone variable of type d. General log-likelihood handling functions are dispatched on d.

var Expon expon

Exponential distribution, singleton instance.

var Gamma gamma

Gamma distribution, singleton instance.

var Normal normal

Normal distribution, singleton instance.

type Categorical Uses

type Categorical struct {
    N int // number of categories
}

the categorical distribution

func (Categorical) Logp Uses

func (dist Categorical) Logp(
    alpha []float64, y float64,
) float64

Logp computes logpdf of a single observation.

func (Categorical) Logps Uses

func (dist Categorical) Logps(
    alpha []float64, ys ...float64,
) float64

Logps computes logpdf of a vector of observations.

func (Categorical) Observe Uses

func (dist Categorical) Observe(x []float64) float64

Observe implements the Model interface

type Dirichlet Uses

type Dirichlet struct {
    N int // number of dimensions
}

Dirichlet distribution

func (Dirichlet) Logp Uses

func (dist Dirichlet) Logp(alpha []float64, y []float64) float64

Logp computes logpdf of a single observation.

func (Dirichlet) Logps Uses

func (dist Dirichlet) Logps(alpha []float64, y ...[]float64) float64

Logps computes logpdf of a vector of observations.

func (Dirichlet) Observe Uses

func (dist Dirichlet) Observe(x []float64) float64

Observe implements the Model interface. The parameters are alpha and observations, flattened.

Directories

PathSynopsis
ad

Package dist imports 3 packages (graph). Updated 2019-04-23. Refresh now. Tools for package owners.