smfishHmrf.hmrfem.multi: Performs HMRF for multivariate normal distribution. Accepts R...

Description Usage Arguments Value More information References Examples

View source: R/smfishHmrf.hmrfem.R

Description

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.

Usage

 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
)

Arguments

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

Value

A list of prob, new mu, new sigma, unnormalized prob after iterations finish

More information

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.

References

\insertRef

Zhu2018smfishHmrf

Examples

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)

smfishHmrf documentation built on Jan. 13, 2021, 12:54 p.m.