func (this *IWPosterior) NextCovar() (Sigma *matrix.DenseMatrix) { if this.covarSampler == nil { this.covarSampler = stat.InverseWishart(this.M+this.S.Count, this.getPsiHat().Arrays()) } Sigma = matrix.MakeDenseMatrixStacked(this.covarSampler()) return }
func (this *IWPosterior) NextPrecision() (Sigma *matrix.DenseMatrix) { if this.precSampler == nil { psiHatInv, _ := this.getPsiHat().Inverse() this.precSampler = stat.Wishart(this.M+this.S.Count, psiHatInv.Arrays()) } Sigma = matrix.MakeDenseMatrixStacked(this.precSampler()) return }