% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CoGAPS.R
\name{CoGAPS}
\alias{CoGAPS}
\title{CoGAPS Matrix Factorization Algorithm}
\usage{
CoGAPS(D, S, nFactor = 7, nEquil = 250, nSample = 250, nOutputs = 1000,
  alphaA = 0.01, alphaP = 0.01, maxGibbmassA = 100, maxGibbmassP = 100,
  seed = -1, messages = TRUE, singleCellRNASeq = FALSE,
  whichMatrixFixed = "N", fixedPatterns = matrix(0),
  checkpointInterval = 0, checkpointFile = "gaps_checkpoint.out",
  nCores = 1, ...)
}
\arguments{
\item{D}{data matrix}

\item{S}{uncertainty matrix (std devs for chi-squared of Log Likelihood)}

\item{nFactor}{number of patterns (basis vectors, metagenes), which must be
greater than or equal to the number of rows of FP}

\item{nEquil}{number of iterations for burn-in}

\item{nSample}{number of iterations for sampling}

\item{nOutputs}{how often to print status into R by iterations}

\item{alphaA}{sparsity parameter for A domain}

\item{alphaP}{sparsity parameter for P domain}

\item{maxGibbmassA}{limit truncated normal to max size}

\item{maxGibbmassP}{limit truncated normal to max size}

\item{seed}{a positive seed is used as-is, while any negative seed tells
the algorithm to pick a seed based on the current time}

\item{messages}{display progress messages}

\item{singleCellRNASeq}{indicates if the data is single cell RNA-seq data}

\item{whichMatrixFixed}{character to indicate whether A or P matric contains
the fixed patterns}

\item{fixedPatterns}{matrix of fixed values in either A or P matrix}

\item{checkpointInterval}{time (in seconds) between creating a checkpoint}

\item{checkpointFile}{name of the checkpoint file}

\item{nCores}{number of cpu cores to run in parallel over}

\item{...}{keeps backwards compatibility with arguments from older versions}
}
\value{
list with A and P matrix estimates
}
\description{
CoGAPS Matrix Factorization Algorithm
}
\details{
calls the C++ MCMC code and performs Bayesian
matrix factorization returning the two matrices that reconstruct
the data matrix
}
\examples{
data(SimpSim)
result <- CoGAPS(SimpSim.D, SimpSim.S, nFactor=3, nOutputs=250)
}