initSlalom {slalom} | R Documentation |
Initialize a SlalomModel with sensible starting values for parameters before training the model.
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)
object |
a |
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 |
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
|
design |
matrix of known factors (covariates) to fit in the
model. Optional if |
verbose |
logical(1), should messages be printed about what the function
is doing? Default is |
save_init |
logical(1), save the initial X values (factor states for
each cell) in the object? Default is |
It is strongly recommended to use newSlalomModel
to
create the SlalomModel
object prior to applying
initSlalom
.
an 'Rcpp_SlalomModel' object
Davis McCarthy
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)