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 Expon expon

Exponential distribution, singleton instance.

var Gamma gamma

Gamma distribution, singleton instance.

var Normal normal

Normal distribution, singleton instance.

var SoftMax func(x, p []float64)

Outside of differentiated context, SoftMax can be used without distribution.

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.

func (Dirichlet) SoftMax Uses

func (dist Dirichlet) SoftMax(x, p []float64)

SoftMax transforms unconstrained parameters to a point on the unit hyperplane suitable to be observed from Dirichlet. x is the original vector, p is a point on the unit hyperplane.

Directories

PathSynopsis
ad

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