bayes

package
v0.0.0-...-d47400d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2015 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Bayesian inference.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BFExch

func BFExch(theta float64, y, n []float64, k float64) float64

BFExch returns the logarithm of the integral of the Bayes factor for testing homogeneity. of a set of proportions.

func BetaBinExch

func BetaBinExch(theta1, theta2 float64, y, n []float64) float64

BetaBinExch returns the log posterior density of logit mean and log precision for a Binomial/beta exchangeable model.

func BetaBinExch0

func BetaBinExch0(theta1, theta2 float64, y, n []float64) float64

BetaBinExch0 returns the log posterior density of mean and precision for a Binomial/beta exchangeable model.

func BetaFromQtls

func BetaFromQtls(p1, x1, p2, x2 float64) (alpha, beta float64)

BetaFromQtls finds the shape parameters of a beta density that matches knowledge of two quantiles of the distribution.

func BetaHDI

func BetaHDI(α, β, credMass, tol float64) (lo, hi float64)

BetaHDI returns the Highhest Density Interval limits of the Beta Distribution.

func BinomPiCDFBPri

func BinomPiCDFBPri(k, n int64, α, β float64) func(x float64) float64

BinomPiCDFBPri returns posterior CDF of the Binomial proportion, general Beta prior.

func BinomPiCDFBPriNext

func BinomPiCDFBPriNext(k, n int64, α, β float64) float64

Binomial proportion, Sampling from posterior, Beta prior

func BinomPiCDFFPri

func BinomPiCDFFPri(k, n int64) func(x float64) float64

BinomPiCDFFPri returns posterior CDF of the Binomial proportion, Flat prior.

func BinomPiCDFHPri

func BinomPiCDFHPri(k, n int64) func(x float64) float64

BinomPiCDFHPri returns posterior CDF of the Binomial proportion, Haldane prior. see Aitkin 2010: 143 for cautions

func BinomPiCDFJPri

func BinomPiCDFJPri(k, n int64) func(x float64) float64

BinomPiCDFJPri returns posterior CDF of the Binomial proportion, Jeffreys prior. see Aitkin 2010: 143 for cautions

func BinomPiCrIBP

func BinomPiCrIBP(α, β, alpha float64, n, k int64) (low, upp float64)

Binomial proportion, credible interval, beta prior, equal tail area. Bolstad 2007 (2e): 153 untested ...

func BinomPiCrIBPriNApprox

func BinomPiCrIBPriNApprox(α, β, alpha float64, n, k int64) (low, upp float64)

BinomPiCrIBPriNApprox returns boundaries of the credible interval of theBinomial proportion, beta prior, equal tail area, normal approximation, Bolstad 2007 (2e): 154-155, eq. 8.8 untested ...

func BinomPiDeviance

func BinomPiDeviance(pi float64, n, k int64) float64

BinomPiDeviance returns the Deviance of the Binomial proportion.

func BinomPiDiffCrI

func BinomPiDiffCrI(postdiffmu, postdiffsigma, alpha float64) (float64, float64)

Credible interval for difference between binomial proportions, approximated by Normal distribution Bolstad 2007 (2e): 248, eq. 13.13 postdiffmu = binomdiffpropnormapproxmu() postdiffsigma = sqrt(binomdiffpropnormapproxvar()) untested ...

func BinomPiDiffMeanNApprox

func BinomPiDiffMeanNApprox(a1, b1, a2, b2 float64, n1, n2, y1, y2 int64) float64

Mean of posterior distribution of unknown difference of binomial proportions, approximated by Normal distribution Bolstad 2007 (2e): 248. untested ...

func BinomPiDiffOneSidedP

func BinomPiDiffOneSidedP(postdiffmu, postdiffsigma float64) float64

func BinomPiDiffVarNApprox

func BinomPiDiffVarNApprox(a1, b1, a2, b2 float64, n1, n2, y1, y2 int64) float64

Variance of posterior distribution of unknown difference of binomial proportions, approximated by Normal distribution Bolstad 2007 (2e): 248. untested ...

func BinomPiEqvSize

func BinomPiEqvSize(α, β float64) int64

BinomPiEqvSize returns the Equivalent sample size of the prior of the Binomial proportion.

func BinomPiLike

func BinomPiLike(pi float64, n, k int64) float64

Binomial proportion, Likelihood

func BinomPiPDFBPri

func BinomPiPDFBPri(k, n int64, α, β float64) func(x float64) float64

BinomPiPDFBPri returns posterior PDF of the Binomial proportion, general Beta prior.

func BinomPiPDFFPri

func BinomPiPDFFPri(k, n int64) func(x float64) float64

BinomPiPDFFPri returns posterior PDF of the Binomial proportion, Flat prior.

func BinomPiPDFHPri

func BinomPiPDFHPri(k, n int64) func(x float64) float64

BinomPiPDFHPri returns posterior PDF of the Binomial proportion, Haldane prior. see Aitkin 2010: 143 for cautions

func BinomPiPDFJPri

func BinomPiPDFJPri(k, n int64) func(x float64) float64

BinomPiPDFJPri returns posterior PDFof the Binomial proportion, Jeffreys prior. see Aitkin 2010: 143 for cautions

func BinomPiPMS

func BinomPiPMS(α, β float64, n, k, whichpi int64) float64

BinomPiPMS returns Posterior mean square of p (Binomial proportion). Bolstad 2007 (2e): 152-153, eq. 8.7

func BinomPiPostMean

func BinomPiPostMean(α, β float64, n, k int64) float64

BinomPiPostMean returns Posterior mean of the Binomial proportion.

func BinomPiPostMedian

func BinomPiPostMedian(α, β float64, n, k int64) float64

BinomPiPostMedian returns Posterior median of the Binomial proportion.

func BinomPiPostModus

func BinomPiPostModus(α, β float64, n, k int64) float64

BinomPiPostModus returns Posterior modus of the Binomial proportion.

func BinomPiPostVar

func BinomPiPostVar(α, β float64, n, k int64) float64

BinomPiPostVar returns Posterior variance of the Binomial proportion. Bolstad 2007 (2e): 151, eq. 8.5

func BinomPiQtlBPri

func BinomPiQtlBPri(k, n int64, α, β float64) func(p float64) float64

BinomPiQtlBPri returns posterior quantile function forBinomial proportion, general Beta prior.

func BinomPiQtlFPri

func BinomPiQtlFPri(k, n int64) func(p float64) float64

BinomPiQtlFPri returns posterior quantile function for Binomial proportion, Flat prior.

func BinomPiQtlHPri

func BinomPiQtlHPri(k, n int64) func(p float64) float64

BinomPiQtlHPri returns posterior quantile function for Binomial proportion, Haldane prior. see Aitkin 2010: 143 for cautions

func BinomPiQtlJPri

func BinomPiQtlJPri(k, n int64) func(p float64) float64

BinomPiQtlJPri returns posterior quantile function for Binomial proportion, Jeffreys prior. see Aitkin 2010: 143 for cautions

func CrI

func CrI(α float64, qtl func(𝛩 float64) float64) (hi, lo float64)

Bayesian credible interval for (analytical) quantile function

func DiscHPI

func DiscHPI(x, p []float64, probContent float64) (probExact float64, hpiSet []float64)

DiscHPI computes a highest probability interval for a discrete distribution.

func ECrI

func ECrI(𝛩 []float64, α float64) (lo, hi float64)

Credible interval for a sample from a posterior density

func FactCTableIndep

func FactCTableIndep(y [][]float64, k float64, m int) (bf, nse float64)

FactCTableIndep returns a Bayes factor against independence for a two-way contingency table assuming a "close to independence" alternative model.

func FactCTableUnif

func FactCTableUnif(y, a [][]float64) float64

FactCTableUnif returns the Bayes factor for testing independence in a contingency table.

func Gibbs

func Gibbs(logpost func([]float64) float64, start []float64, m int, scale []float64) (vth [][]float64, arate []float64)

Metropolis within Gibbs sampling algorithm of a posterior distribution.

func HistPrior

func HistPrior(p, midpts, prob []float64) []float64

HistPrior returns the density of a probability distribution defined on a set of equal-width intervals.

func HowardPosteriorProb

func HowardPosteriorProb(y1, n1, y2, n2, alpha, beta, gamma, delta, sigma float64) float64

HowardPosteriorProb returns the posterior probability that p1 > p2.

func KnownVariancePosterior

func KnownVariancePosterior(Y, X, Sigma, M, Phi *mx.DenseMatrix) func() (A *mx.DenseMatrix)

If Y ~ N(AX, Sigma, I) and A ~ N(M, Sigma, Phi) this returns a sampler for P(A|X,Y,Sigma,M,Phi)

func LnHowardPrior

func LnHowardPrior(p1, p2, alpha, beta, gamma, delta, sigma float64) float64

LnHowardPrior returns the logarithm of a dependent prior on two proportions proposed by Howard in a Statistical Science paper in 1998.

func LogCTablePost

func LogCTablePost(s1, f1, s2, f2, theta1, theta2 float64) float64

LogCTablePost returns the log posterior density for the difference and sum of logits in a 2x2 contingency table for independent binomial samples and uniform prior placed on the logits.

func LogPoissGamma

func LogPoissGamma(theta, y []float64, sh, rt float64) []float64

LogPoissGamma returns the logarithm of the posterior density of a Poisson log mean with a gamma prior.

func LogPoissNormal

func LogPoissNormal(theta, y []float64, mean, sd float64) []float64

LogPoissNormal returns the logarithm of the posterior density of a Poisson log mean with a normal prior.

func LogisticPost

func LogisticPost(x, n, y []float64, beta0, beta1 float64) float64

LogisticPost returns the log posterior density of (beta0, beta1) when yi are independent binomial(ni, pi) and logit(pi)=beta0+beta1*xi and a uniform prior is placed on (beta0, beta1).

func MultinomPiNext

func MultinomPiNext(α, x []float64) []float64

Sampling from posterior, Dirichlet prior Returns an array of sampled Multinomial Pi's

func MultinomPiPDFDirPri

func MultinomPiPDFDirPri(α, x []float64) float64

Posterior PDF, Dirichlet prior for Haldane improper prior, use α[i] = 0 Ericson 1969 recommends prior with sum(α[i]) small, of the order of 1, e.g., 1/len(α) Aitkin 2010: 96-107

func NormMeanTestOneSided

func NormMeanTestOneSided(m0, priMean, priSD, smpMean float64, smpSize int, popSd float64) (bf, priOdds, postOdds, postH float64)

NormMeanTestOneSided does a Bayesian test of the hypothesis that a normal mean is less than or equal to a specified value.

func NormMeanTestTwoSided

func NormMeanTestTwoSided(m0, prob float64, t []float64, smpMean float64, smpSize int, popSd float64) (bf, post []float64)

NormMeanTestTwoSided does a Bayesian test that a normal mean is equal to a specified value using a normal prior.

func NormMuCrIFPriKnown

func NormMuCrIFPriKnown(nObs int, ȳ, σ, α float64) (lo, hi float64)

Credible interval for unknown Normal μ, with KNOWN σ, and flat prior Bolstad 2007 (2e): 212, eq. 11.7

func NormMuCrINPriKnown

func NormMuCrINPriKnown(nObs int, ȳ, σ, μPri, σPri, α float64) (lo, hi float64)

Credible interval for unknown Normal μ, with KNOWN σ, and Normal prior Bolstad 2007 (2e): 212, eq. 11.7

func NormMuPMFDPri

func NormMuPMFDPri(nObs int, ȳ, σ float64, μ []float64, μPri []float64) (post []float64)

PMF of the posterior distribution of unknown Normal μ, with KNOWN σ, and discrete prior, for sample Bolstad 2007 (2e): 203, eq. 11.2

func NormMuPostMean

func NormMuPostMean(nObs int, ȳ, σ, μPri, σPri float64) float64

Posterior mean for unknown Normal μ, with KNOWN σ. Bolstad 2007 (2e): 209, eq. 11.6

func NormMuPostStd

func NormMuPostStd(nObs int, σ, μPri, σPri float64) float64

Posterior standard deviation for unknown Normal μ, with KNOWN σ. Bolstad 2007 (2e): 209, eq. 11.5

func NormMuQtlFPri

func NormMuQtlFPri(nObs int, ȳ, σ, p float64) float64

Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and flat prior (Jeffrey's prior), for sample Bolstad 2007 (2e): 207

func NormMuQtlNPri

func NormMuQtlNPri(nObs int, ȳ, σ, μPri, σPri, p float64) float64

Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and Normal prior, for sample Bolstad 2007 (2e): 209, eq. 11.5, 11.6

func NormMuSinglePMFDPri

func NormMuSinglePMFDPri(y, σ float64, μ []float64, μPri []float64) (post []float64)

PMF of the posterior distribution of unknown Normal μ, with KNOWN σ, and discrete prior, for single observation. Bolstad 2007 (2e): 200-201.

func NormMuSingleQtlFPri

func NormMuSingleQtlFPri(y, σ, p float64) float64

Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and flat prior (Jeffrey's prior), for single observation Bolstad 2007 (2e): 206

func NormMuSingleQtlNPri

func NormMuSingleQtlNPri(y, σ, μPri, σPri, p float64) float64

Quantile for posterior distribution of unknown Normal μ, with KNOWN σ, and Normal prior, for single observation Bolstad 2007 (2e): 208, eq. 11.4

func NormPostInfPriorNext

func NormPostInfPriorNext(data []float64, a, b, mu0, tau2 float64) (postMu, postS2 float64)

NormPostInfPriorNext returns a simulated tuple from the joint posterior distribution of the mean and variance for a normal sampling prior with a noninformative or informative prior. The prior assumes mu and sigma2 are independent with mu assigned a normal prior with mean mu0 and variance tau2, and sigma2 is assigned a inverse gamma prior with parameters a and b.

func NormPostNoPriorNext

func NormPostNoPriorNext(data []float64) (postMu, postS2 float64)

NormPostNoPriorNext returns a sampled tuple from the joint posterior distribution of the mean and variance for a normal sampling prior.

func NormPostSim

func NormPostSim(data []float64, a, b, mu0, tau2 float64, m int) (postMu, postS2 []float64)

NormPostSim returns a simulated sample from the joint posterior distribution of the mean and variance for a normal sampling prior with a noninformative or informative prior. The prior assumes mu and sigma2 are independent with mu assigned a normal prior with mean mu0 and variance tau2, and sigma2 is assigned a inverse gamma prior with parameters a and b.

func NormPostSimNoPrior

func NormPostSimNoPrior(data []float64, m int) (postMu, postS2 []float64)

NormPostSimNoPrior returns a simulated sample from the joint posterior distribution of the mean and variance for a normal sampling prior.

func NormalMuDiffCDFNPriKn

func NormalMuDiffCDFNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(x float64) float64

Posterior CDF of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246

func NormalMuDiffCrIFPriUn

func NormalMuDiffCrIFPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, α float64) func(α float64) (lo, hi float64)

Credible interval of the difference of two means (μ1-μ2) of Normal distributions with UNKNOWN variances (Behrens-Fisher problem), and FLAT priors Bolstad 2007:245-246 untested ...

func NormalMuDiffCrINPriUn

func NormalMuDiffCrINPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, α float64) func(α float64) (lo, hi float64)

Credible interval of the difference of two means (μ1-μ2) of Normal distributions with UNKNOWN variances (Behrens-Fisher problem), and NORMAL priors Bolstad 2007:245-246 untested ...

func NormalMuDiffMomentsNPriKn

func NormalMuDiffMomentsNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) (μ, σ float64)

Posterior moments of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246

func NormalMuDiffPDFNPriKn

func NormalMuDiffPDFNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(x float64) float64

Posterior PDF of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246

func NormalMuDiffQtlNPriKn

func NormalMuDiffQtlNPriKn(nObs1, nObs2 int, ȳ1, ȳ2, σ1, σ2, μ1Pri, σ1Pri, μ2Pri, σ2Pri float64) func(p float64) float64

Posterior quantile of the difference of two means (μ1-μ2) of Normal distributions with KNOWN variances, and NORMAL priors Bolstad 2007:245-246

func NormalMuDiffQtlNPriUn

func NormalMuDiffQtlNPriUn(nObs1, nObs2 int, ȳ1, ȳ2, s1, s2, μ1Pri, σ1Pri, μ2Pri, σ2Pri, p float64) func(p float64) float64

Quantile of the difference of two means (μ1-μ2) of Normal distributions with UNKNOWN variances (Behrens-Fisher problem), and NORMAL priors Bolstad 2007:245-246 untested ...

func NormalNormalMix

func NormalNormalMix(probs, priorMean, priorVar []float64, y, sigma2 float64) (postProbs, postMean, postVar []float64)

NormalNormalMix returns the parameters and mixing probabilities for a normal sampling problem, variance known, where the prior is a discrete mixture of normal densities.

func PNullSmpLowT

func PNullSmpLowT(θ []float64, θ0 float64) float64

PNullSmpLowT returns the lower tail probability of a one sided null hypothesis from a sample from a posterior density.

func PNullSmpUppT

func PNullSmpUppT(θ []float64, θ0 float64) float64

PNullSmpUppT returns the upper tail probability of a one sided null hypothesis from a sample from a posterior density.

func PoissGamExch

func PoissGamExch(theta1, theta2, z0 float64, y, e []float64) float64

PoissGamExch returns the log posterior density of log alpha and log mu for a Poisson/gamma exchangeable model.

func PoissonLambdaCDFFPri

func PoissonLambdaCDFFPri(sumK, n int64) func(p float64) float64

Poisson λ, posterior CDF, flat prior.

func PoissonLambdaCDFGPri

func PoissonLambdaCDFGPri(sumK, n int64, r, v float64) func(p float64) float64

Poisson λ, posterior CDF, gamma prior. Use r=m^2/s^2, and v=m/s^2, if you summarize your prior belief with mean == m, and std == s.

func PoissonLambdaCDFJPri

func PoissonLambdaCDFJPri(sumK, n int64) func(p float64) float64

Poisson λ, posterior CDF, Jeffreys' prior.

func PoissonLambdaCrIGPri

func PoissonLambdaCrIGPri(sumK, n int64, r, v, α float64) (lo, hi float64)

Credible interval for unknown Poisson rate λ, and gamma prior, equal tail area Bolstad 2007 (2e): 192-193. untested ...

func PoissonLambdaEqvSize

func PoissonLambdaEqvSize(v float64) float64

Equivalent sample size of the prior Bolstad 2007 (2e): Chapter 10, p. 187.

func PoissonLambdaIQR

func PoissonLambdaIQR(sumK, n int64, r, v float64) float64

posterior interquartile range of λ Bolstad 2007 (2e): Chapter 10, p. 189.

func PoissonLambdaLike

func PoissonLambdaLike(sumK, n int64, λ float64) float64

Likelihood of Poisson λ. Bolstad 2007 (2e): Chapter 10, p. 184.

func PoissonLambdaMSE

func PoissonLambdaMSE(r, v, λ float64) float64

Mean Squared Error of λ Bolstad 2007 (2e): Chapter 10, p. 191.

func PoissonLambdaNextFPri

func PoissonLambdaNextFPri(sumK, n int64) float64

PoissonLambdaNextFPri returns random number drawn from the posterior, flat prior.

func PoissonLambdaNextGPri

func PoissonLambdaNextGPri(sumK, n int64, r, v float64) float64

PoissonLambdaNextGPri returns random number drawn from the posterior, Gamma prior.

func PoissonLambdaNextJPri

func PoissonLambdaNextJPri(sumK, n int64) float64

PoissonLambdaNextJPri returns random number drawn from the posterior, Jeffreys' prior.

func PoissonLambdaOneSidedOdds

func PoissonLambdaOneSidedOdds(sumK, n int64, r, v, λ0 float64) float64

One-sided odds ratio for Poisson rate λ Bolstad 2007 (2e): 193. H0: λ <= λ0 vs H1: λ > λ0 Note: The alternative is in the direction we wish to detect.

func PoissonLambdaOneSidedTst

func PoissonLambdaOneSidedTst(sumK, n int64, r, v, α, λ0 float64) bool

One-sided test for Poisson rate λ Bolstad 2007 (2e): 193. H0: λ <= λ0 vs H1: λ > λ0 Note: The alternative is in the direction we wish to detect.

func PoissonLambdaPDFFPri

func PoissonLambdaPDFFPri(sumK, n int64) func(p float64) float64

Poisson λ, posterior PDF, flat prior.

func PoissonLambdaPDFGPri

func PoissonLambdaPDFGPri(sumK, n int64, r, v float64) func(p float64) float64

Poisson λ, posterior PDF, gamma prior. Use r=m^2/s^2, and v=m/s^2, if you summarize your prior belief with mean == m, and std == s.

func PoissonLambdaPDFJPri

func PoissonLambdaPDFJPri(sumK, n int64) func(p float64) float64

Poisson λ, posterior PDF, Jeffreys' prior.

func PoissonLambdaPostMean

func PoissonLambdaPostMean(sumK, n int64, r, v float64) float64

Posterior mean Bolstad 2007 (2e): Chapter 10, p. 190-191.

func PoissonLambdaPostMeanBias

func PoissonLambdaPostMeanBias(r, v, λ float64) float64

Posterior mean bias Bolstad 2007 (2e): Chapter 10, p. 191.

func PoissonLambdaPostVar

func PoissonLambdaPostVar(r, v, λ float64) float64

Posterior variance Bolstad 2007 (2e): Chapter 10, p. 191.

func PoissonLambdaQtlFPri

func PoissonLambdaQtlFPri(sumK, n int64) func(p float64) float64

Poisson λ, posterior quantile function, flat prior.

func PoissonLambdaQtlGPri

func PoissonLambdaQtlGPri(sumK, n int64, r, v float64) func(p float64) float64

Poisson λ, posterior quantile function, gamma prior. Use r=m^2/s^2, and v=m/s^2, if you summarize your prior belief with mean == m, and std == s.

func PoissonLambdaQtlJPri

func PoissonLambdaQtlJPri(sumK, n int64) func(p float64) float64

Poisson λ, posterior quantile function, Jeffreys' prior.

func PoissonLambdaTwoSidedTst

func PoissonLambdaTwoSidedTst(sumK, n int64, r, v, α, λ0 float64) bool

Two-sided test for Poisson rate λ Bolstad 2007 (2e): 194. H0: λ = λ0 vs H1: λ != λ0

func ProbBetaTest

func ProbBetaTest(p0, prob, a, b float64, succ, fail int) (bf, post float64)

ProbBetaTest does a Bayesian test that a proportion is equal to a specified value using a beta prior.

func PropDisc

func PropDisc(p, prior []float64, succ, fail int) []float64

PropDisc returns the posterior distribution for a proportion for a discrete prior distribution.

Types

type IndexSorter

type IndexSorter struct {
	Target  []float64
	Indices []int
}

func NewSorter

func NewSorter(t []float64) IndexSorter

func (IndexSorter) Len

func (s IndexSorter) Len() int

func (IndexSorter) Less

func (s IndexSorter) Less(i, j int) bool

func (IndexSorter) Swap

func (s IndexSorter) Swap(i, j int)

type KnownVarianceLRPosterior

type KnownVarianceLRPosterior struct {
	Sigma, M, Phi *mx.DenseMatrix

	XXt, YXt *mx.DenseMatrix
	// contains filtered or unexported fields
}

func NewKnownVarianceLRPosterior

func NewKnownVarianceLRPosterior(M, Sigma, Phi *mx.DenseMatrix) (this *KnownVarianceLRPosterior)

M is r x c, o x i Sigma is r x r, o x o Phi is c x c, i x i

Sigma matches Y o x 1 output dimension Phi matches X i x 1 input dimension

func (*KnownVarianceLRPosterior) GetSampler

func (this *KnownVarianceLRPosterior) GetSampler() func() *mx.DenseMatrix

func (*KnownVarianceLRPosterior) Insert

func (this *KnownVarianceLRPosterior) Insert(x, y *mx.DenseMatrix)

func (*KnownVarianceLRPosterior) Remove

func (this *KnownVarianceLRPosterior) Remove(x, y *mx.DenseMatrix)

func (*KnownVarianceLRPosterior) Sample

func (this *KnownVarianceLRPosterior) Sample() (A *mx.DenseMatrix)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL