SC.MEB.RdSC.MEB implements the model SC-MEB, spatial clustering with hidden Markov random field using empirical Bayes.
SC.MEB(
  y,
  Adj_sp,
  beta_grid = seq(0, 4, 0.2),
  K_set = 2:10,
  parallel = TRUE,
  num_core = 5,
  PX = TRUE,
  maxIter_ICM = 10,
  maxIter = 50,
  ...
)| y | is n-by-d PCs. | 
|---|---|
| Adj_sp | is a sparse matrix of neighborhood. It is often generated from function find_neighbors2 or getneighborhood_fast. | 
| beta_grid | is a numeric vector specifying the smoothness parameter of Random Markov Field. The default is seq(0,4,0.2). | 
| K_set | is an integer vector specifying the numbers of mixture components (clusters) for which the BIC is to be calculated. The default is K = 2:10. | 
| parallel | is a logical value to decide whether the function SC.MEB run in parallel. The default is TRUE. | 
| num_core | is an integer value to decide how many cores are used to run SC.MEB in parallel. | 
| PX | is a logical value to decide whether to use parameter expansion in EM algorithm | 
| maxIter_ICM | is the maximum iteration of ICM algorithm. The default is 10. | 
| maxIter | is the maximum iteration of EM algorithm. The default is 50. | 
a list, We briefly explain the output of the SC.MEB.
The item 'x' contains clustering results.
The item 'gam' is the posterior probability matrix.
The item 'ell' is the opposite log-likelihood.
The item 'mu' is the mean of each component.
The item 'sigma' is the variance of each component.
SC.MEB can implements the model SC-MEB in parallel which can improve the speed of the computation.
Yang Y, Shi X, Zhou Q, et al. SC-MEB: spatial clustering with hidden Markov random field using empirical Bayes[J]. bioRxiv, 2021.