gapsMapRun
calls the C++ MCMC code and performs Bayesian
matrix factorization returning the two matrices that reconstruct
the data matrix; as opposed to gapsRun, this method takes an
additional input specifying set patterns in the P matrixgapsMapRun
calls the C++ MCMC code and performs Bayesian
matrix factorization returning the two matrices that reconstruct
the data matrix; as opposed to gapsRun, this method takes an
additional input specifying set patterns in the P matrixgapsMapRun(D, S, FP, ABins = data.frame(), PBins = data.frame(),
nFactor = 5, simulation_id = "simulation", nEquil = 1000,
nSample = 1000, nOutR = 1000, output_atomic = "FALSE",
fixedMatrix = "P", fixedBinProbs = "FALSE", fixedDomain = "N",
sampleSnapshots = "TRUE", numSnapshots = 100, alphaA = 0.01,
nMaxA = 1e+05, max_gibbmass_paraA = 100, alphaP = 0.01, nMaxP = 1e+05,
max_gibbmass_paraP = 100)
FP
after rescaling to have norm 1.CoGAPS
,gapsRun
## Load data
data('SimpSim')
## Specify the fixed pattern
mapP <- matrix(0,nrow=2,ncol=20)
mapP[1,1:10] <- 1
mapP[2,11:20] <- 1
## Run the GAPS matrix decomposition
testmap <- gapsMapRun(SimpSim.D, SimpSim.S, FP=mapP,
nFactor=3,nEquil = 1000,nSample = 1000)
## Compare fixed patterns to input patterns (after scaling)
summary(t(testmap$Pmean[2:3,] - sweep(mapP,1,apply(mapP,1,sum),FUN="/")))
Run the code above in your browser using DataLab