
Last chance! 50% off unlimited learning
Sale ends in
This is a generic function that will generate the sufficient statistics of a given Bayesian bricks object. i.e.
for the model structure:
sufficientStatistics()
return the sufficient statistics for different model structures:
SA =
SAx =
?sufficientStatistics.LinearGaussianGaussian
for details.Where
N: the effective number of samples.
xsum: the row sums of the samples.
?sufficientStatistics.GaussianGaussian
for details.Where
N: the effective number of samples.
xsum: the sample scatter matrix centered on the mean vector.
?sufficientStatistics.GaussianInvWishart
for details.Where
N: the effective number of samples.
xsum: the row sums of the samples.
S: the uncentered sample scatter matrix.
?sufficientStatistics.GaussianNIW
for details.Where
N: the effective number of samples.
SXx: covariance of X and x
SX: the uncentered sample scatter matrix.
Sx: the variance of x
?sufficientStatistics.GaussianNIG
for details.Where
?sufficientStatistics.CatDirichlet
for details.
Where
?sufficientStatistics.CatDP
for details.
Where
?sufficientStatistics.DP
for details.
Where
?sufficientStatistics.HDP
for details.
Where
?sufficientStatistics.HDP2
for details.
sufficientStatistics(obj, x, ...)
a "BayesianBrick" object used to select a method.
a set of samples.
further arguments passed to or from other methods.
An object of corresponding sufficient statistics class, such as "ssGaussian"
sufficientStatistics.LinearGaussianGaussian
for Linear Gaussian and Gaussian conjugate structure, sufficientStatistics.GaussianGaussian
for Gaussian-Gaussian conjugate structure, sufficientStatistics.GaussianInvWishart
for Gaussian-Inverse-Wishart conjugate structure, sufficientStatistics.GaussianNIW
for Gaussian-NIW conjugate structure, sufficientStatistics.GaussianNIG
for Gaussian-NIG conjugate structure, sufficientStatistics.CatDirichlet
for Categorical-Dirichlet conjugate structure, sufficientStatistics.CatDP
for Categorical-DP conjugate structure ...
# NOT RUN {
x <- rGaussian(10,mu = 1,Sigma = 1)
obj <- GaussianNIW() #an GaussianNIW object
sufficientStatistics(obj=obj,x=x)
# }
Run the code above in your browser using DataLab