stoc.em: Stochastic EM algorithm for initial parameter estimation

Description Usage Arguments Details Value Examples

View source: R/hbfm_functions.R

Description

Function used to implement the stochastic EM algorithm defined in the "A sparse Bayesian factor model for the construction of gene co-expression networks from single-cell RNA sequencing count data" manuscript.

Usage

1
2
stoc.em(Y, Fac, M.stoc = 2000, M.int = 100, M.eval = 200,
  M.ll.seq = 10, H = 50, seed = 123, verbose = FALSE)

Arguments

Y

data.frame or matrix of gene expression counts where the rows correspond to genes and columns correspond to cells; Y must contain integers and have row names

Fac

number of factors to consider in the model; only a single number is accepted

M.stoc

total number of stochastic EM iterations

M.int

initial number of MCMC draws before maximization

M.eval

number of iterations to be used for parameter estimation; the final M.eval iterations from the M.stoc number of stochastic EM iterations will be considered

M.ll.seq

intervals for calculating marginal log-likelihood before final M.eval iterations; used to reduce computational time

H

number of lambda draws for marginal log-likelihood calculation

seed

seed for random number generation

verbose

if TRUE, stoc.em status is displayed at every 100th iteration

Details

This algorithm should be used before hbfm.fit as it generates initial parameter values for use in hbfm.fit.

Value

hbfm.par-class object containing:

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
## Load dataset
data(gene.mat)

## Run stochastic EM first
## Consider F=5 factors
fit1 <- stoc.em(Y=gene.mat, Fac = 5)


## End(Not run)

mnsekula/hbfm documentation built on June 29, 2020, 5:12 a.m.