Instrastructure to store and process MCMC results
Source:R/machinelearning-framework-mcmc.R
MCMCParams.Rd
The MCMCParams
infrastructure is used to store and process
Marchov chain Monte Carlo results for the T-Augmented Gaussian
Mixture model (TAGM) from Crook et al. (2018).
Usage
chains(object)
# S4 method for class 'MCMCParams'
show(object)
# S4 method for class 'ComponentParam'
show(object)
# S4 method for class 'MCMCChain'
show(object)
# S4 method for class 'MCMCChains'
length(x)
# S4 method for class 'MCMCParams'
length(x)
# S4 method for class 'MCMCChains,ANY,ANY'
x[[i, j = "missing", drop = "missing"]]
# S4 method for class 'MCMCParams,ANY,ANY'
x[[i, j = "missing", drop = "missing"]]
# S4 method for class 'MCMCChains,ANY,ANY,ANY'
x[i, j = "missing", drop = "missing"]
# S4 method for class 'MCMCParams,ANY,ANY,ANY'
x[i, j = "missing", drop = "missing"]
# S4 method for class 'MCMCChains'
show(object)
Arguments
- object
An instance of appropriate class.
- x
Object to be subset.
- i
An
integer()
. Should be of length 1 for[[
.- j
Missing.
- drop
Missing.
Details
Objects of the MCMCParams
class are created with the
tagmMcmcTrain()
function. These objects store the priors of
the generative TAGM model and the results of the MCMC chains,
which themselves are stored as an instance of class MCMCChains
and can be accessed with the chains()
function. A summary of the
MCMC chains (or class MCMCSummary
) can be further computed with
the tagmMcmcProcess()
function.
See the pRoloc-bayesian vignette for examples.
Slots
chains
list()
containing the individual full MCMC chain results in anMCMCChains
instance. Each element must be a validMCMCChain
instance.posteriorEstimates
A
data.frame
documenting the prosterior priors in anMCMCSummary
instance. It contains N rows and columnstagm.allocation
,tagm.probability
,tagm.outlier
,tagm.probability.lowerquantile
,tagm.probability.upperquantile
andtagm.mean.shannon
.diagnostics
A
matrix
of dimensions 1 by 2 containing theMCMCSummary
diagnostics.tagm.joint
A
matrix
of dimensions N by K storing the joint probability in anMCMCSummary
instance.method
character(1)
describing the method in theMCMCParams
object.chains
Object of class
MCMCChains
containing the full MCMC chain results stored in theMCMCParams
object.priors
summary
Object of class
MCMCSummary
the summarised MCMC results available in theMCMCParams
instance.n
integer(1)
indicating the number of MCMC interactions. Stored in anMCMCChain
instance.K
integer(1)
indicating the number of components. Stored in anMCMCChain
instance.N
integer(1)
indicating the number of proteins. Stored in anMCMCChain
instance.Component
matrix(N, n)
component allocation results of anMCMCChain
instance.ComponentProb
matrix(N, n, K)
component allocation probabilities of anMCMCChain
instance.Outlier
matrix(N, n)
outlier allocation results.OutlierProb
matrix(N, n, 2)
outlier allocation probabilities of anMCMCChain
instance.
See also
The function tagmMcmcTrain()
to construct object of
this class.