selectK.Rd
The function selectK is used to select the best K according to BIC or Modified BIC criterion.
selectK(SCobject, K_set = 2:10, criterion = "BIC", c = 1)
SCobject | is an object generated from SC.MEB function. |
---|---|
K_set | is a integer vector used in SC.MEB. The default is 2:10 |
criterion | is a character specifying the criterion for selecting K. The default value is BIC. The alternative value MBIC can also be used. |
c | is a positive value in the modified BIC. The default is 1. Here we briefly explain how to choose the parameter c in the modified BIC. In general, For the ST or Visium dataset, it often ranges from 0.4 to 1 while for the MERFISH dataset with large number of cells, it often becomes larger, for example 10,20. Most importantly, SC-MEB is fast, scaling well in terms of sample size, which allow the user to tune the c based on their prior knowledge about the tissues or cells. |
a list contains two items. one is for the best K and the other is the clustering labels of n spots.
The function selectK is used to select the best K according to BIC or Modified BIC criterion.