initSlalom: Initialize a SlalomModel object

Description Usage Arguments Details Value Author(s) Examples

View source: R/SlalomModel-methods.R

Description

Initialize a SlalomModel with sensible starting values for parameters before training the model.

Usage

1
2
3
initSlalom(object, alpha_priors = NULL, epsilon_priors = NULL,
  noise_model = "gauss", seed = NULL, pi_prior = NULL, n_hidden = NULL,
  design = NULL, verbose = FALSE, save_init = FALSE)

Arguments

object

a Rcpp_SlalomModel object

alpha_priors

numeric(2) giving alpha and beta hyperparameters for a gamma prior distribution for alpha parameters (precision of factor weights)

epsilon_priors

numeric(2) giving alpha and beta hyperparameters for a gamma prior distribution for noise precision parameters

noise_model

character(1) defining noise model, defaults to "gauss" for Gaussian noise model

seed

integer(1) value supplying a random seed to make results reproducible (default is NULL)

pi_prior

numeric matrix (genes x factors) giving prior probability of a gene being active for a factor

n_hidden

integer(1), number of hidden factors in model. Required if pi_prior is not NULL, ignored otherwise.

design

matrix of known factors (covariates) to fit in the model. Optional if pi_prior is not NULL, ignored otherwise.

verbose

logical(1), should messages be printed about what the function is doing? Default is TRUE.

save_init

logical(1), save the initial X values (factor states for each cell) in the object? Default is FALSE as this is potentially a large N (number of cell) by K (number of factors) matrix.

Details

It is strongly recommended to use newSlalomModel to create the SlalomModel object prior to applying initSlalom.

Value

an 'Rcpp_SlalomModel' object

Author(s)

Davis McCarthy

Examples

1
2
3
4
5
gmtfile <- system.file("extdata", "reactome_subset.gmt", package = "slalom")
genesets <- GSEABase::getGmt(gmtfile)
data("mesc")
model <- newSlalomModel(mesc, genesets, n_hidden = 5, min_genes = 10)
model <- initSlalom(model)

slalom documentation built on Nov. 8, 2020, 5:24 p.m.