Skip to contents

The function SetModelParameters is used to set model parameters for iSC.MEB.

Usage

SetModelParameters(
  obj,
  beta_grid = seq(0, 5, by = 0.2),
  maxIter_ICM = 6,
  maxIter = 25,
  epsLogLik = 1e-05,
  verbose = TRUE,
  int.model = "EEE",
  init.start = 1,
  Sigma_equal = FALSE,
  Sigma_diag = TRUE,
  seed = 1,
  coreNum = 1,
  criteria = c("MBIC", "MAIC", "BIC", "AIC"),
  c_penalty = 1
)

Arguments

obj

An iSCMEBObj object.

beta_grid

An optional vector of positive value, the candidate set of the smoothing parameter to be searched by the grid-search optimization approach, defualt as a sequence starts from 0, ends with 5, increase by 0.2.

maxIter_ICM

An optional positive value, represents the maximum iterations of ICM (6 by default).

maxIter

An optional positive value, represents the maximum iterations of EM (25 by default).

epsLogLik

An optional positive vlaue, tolerance vlaue of relative variation rate of the observed pseudo log-loglikelihood value, defualt as '1e-5'.

verbose

An optional logical value, whether output the information of the ICM-EM algorithm.

int.model

An optional string, specify which Gaussian mixture model is used in evaluting the initial values for iSC.MEB, default as "EEE"; and see Mclust for more models' names.

init.start

An optional number of times to calculate the initial value (1 by default). When init.start is larger than 1, initial value will be determined by log likelihood of mclust results.

Sigma_equal

An optional logical value, specify whether Sigmaks are equal, default as FALSE.

Sigma_diag

An optional logical value, specify whether Sigmaks are diagonal matrices, default as TRUE.

seed

An optional integer, the random seed in fitting iSC.MEB model.

coreNum

An optional positive integer, means the number of thread used in parallel computating (1 by default).

criteria

A string, specify the criteria used for selecting the number of clusters, supporting "MBIC", "MAIC", "BIC" and "AIC" ("MBIC" by default).

c_penalty

An optional positive value, the adjusted constant used in the MBIC criteria (1 by default).

Value

Returns iSC.MEB object.

See also

Examples

data(iSCMEBObj_toy)
#> Warning: data set 'iSCMEBObj_toy' not found
iSCMEBObj_toy <- SetModelParameters(iSCMEBObj_toy)
iSCMEBObj_toy@parameterList
#> $npcs
#> [1] 15
#> 
#> $pca.method
#> [1] "APCA"
#> 
#> $reduction.name
#> [1] "pca"
#> 
#> $platform
#> [1] "Visium"
#> 
#> $beta_grid
#>  [1] 0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 2.0 2.2 2.4 2.6 2.8 3.0 3.2 3.4 3.6
#> [20] 3.8 4.0 4.2 4.4 4.6 4.8 5.0
#> 
#> $maxIter_ICM
#> [1] 6
#> 
#> $maxIter
#> [1] 25
#> 
#> $epsLogLik
#> [1] 1e-05
#> 
#> $verbose
#> [1] TRUE
#> 
#> $int.model
#> [1] "EEE"
#> 
#> $init.start
#> [1] 1
#> 
#> $Sigma_equal
#> [1] FALSE
#> 
#> $Sigma_diag
#> [1] TRUE
#> 
#> $seed
#> [1] 1
#> 
#> $coreNum
#> [1] 1
#> 
#> $criteria
#> [1] "MBIC"
#> 
#> $c_penalty
#> [1] 1
#>