Instrastructure to store and process MCMC results
Source:R/machinelearning-framework-mcmc.R
MCMCParams.RdThe 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
chainslist()containing the individual full MCMC chain results in anMCMCChainsinstance. Each element must be a validMCMCChaininstance.posteriorEstimatesA
data.framedocumenting the prosterior priors in anMCMCSummaryinstance. It contains N rows and columnstagm.allocation,tagm.probability,tagm.outlier,tagm.probability.lowerquantile,tagm.probability.upperquantileandtagm.mean.shannon.diagnosticsA
matrixof dimensions 1 by 2 containing theMCMCSummarydiagnostics.tagm.jointA
matrixof dimensions N by K storing the joint probability in anMCMCSummaryinstance.methodcharacter(1)describing the method in theMCMCParamsobject.chainsObject of class
MCMCChainscontaining the full MCMC chain results stored in theMCMCParamsobject.priorssummaryObject of class
MCMCSummarythe summarised MCMC results available in theMCMCParamsinstance.ninteger(1)indicating the number of MCMC interactions. Stored in anMCMCChaininstance.Kinteger(1)indicating the number of components. Stored in anMCMCChaininstance.Ninteger(1)indicating the number of proteins. Stored in anMCMCChaininstance.Componentmatrix(N, n)component allocation results of anMCMCChaininstance.ComponentProbmatrix(N, n, K)component allocation probabilities of anMCMCChaininstance.Outliermatrix(N, n)outlier allocation results.OutlierProbmatrix(N, n, 2)outlier allocation probabilities of anMCMCChaininstance.
See also
The function tagmMcmcTrain() to construct object of
this class.