Description Usage Arguments Value More information References Examples
View source: R/smfishHmrf.hmrfem.R
This function performs HMRF \insertCiteZhu2018smfishHmrf on multivariate normal distributions. Different from other variations, this function accepts R data structures directly as inputs, and only accepts a single value of beta.
This function exists for legacy and compatibility reason. User should use smfishHmrf.hmrfem.multi.it.min function.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | smfishHmrf.hmrfem.multi(
y,
neighbors,
numnei,
blocks,
beta = 0.5,
mu,
sigma,
err = 1e-07,
maxit = 50,
verbose,
dampFactor = NULL,
forceDetectDamp = FALSE,
tolerance = 1e-60
)
|
y |
gene expression matrix |
neighbors |
adjacency matrix between cells |
numnei |
a vector containing number of neighbors per cell |
blocks |
a list of cell colors for deciding the order of cell update |
beta |
the beta to try (smoothness parameter) |
mu |
a 2D matrix (i,j) of cluster mean (initialization) |
sigma |
a 3D matrix (i,j,k) where (i,j) is the covariance of cluster k (initialization) |
err |
the error that is allowed between successive iterations |
maxit |
maximum number of iterations |
verbose |
TRUE or FALSE |
dampFactor |
the dampening factor |
forceDetectDamp |
will auto detect a dampening factor instead of using the specified one |
tolerance |
applicable when forceDetectDamp is set to TRUE |
A list of prob, new mu, new sigma, unnormalized prob after iterations finish
Arguments mu and sigma refer to the cluster centroids from running kmeans algorithm. They serve as initialization of HMRF. Users should refer to smfishHmrf.hmrfem.multi.it.min for more information about function parameters and the requirements.
Zhu2018smfishHmrf
1 2 3 4 5 | data(seqfishplus)
s <- seqfishplus
res<-smfishHmrf.hmrfem.multi(s$y, s$nei, s$numnei, s$blocks, beta=28,
mu=s$mu, sigma=s$sigma, err=1e-7, maxit=50, verbose=TRUE, dampFactor=s$damp,
tolerance=1e-5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.