Learn R Programming

MixfMRI (version 0.1-1)

algorithm: Main algorithms implemented in fclust

Description

Main algorithms implemented in fclust.

Usage

ecm.step.gbd(PARAM.org)

apecma.step.gbd(PARAM.org)

em.step.gbd(PARAM.org)

Arguments

PARAM.org

an initialized PARAM, usually returned by set.global(), initial.em.gbd(), and initial.RndEM.gbd().

Value

Return an optimized PARAM.

Details

These are main algorithms implemented in fclust().

References

Chen, W.-C. and Maitra, R. (2021) “A Practical Model-based Segmentation Approach for Accurate Activation Detection in Single-Subject functional Magnetic Resonance Imaging Studies”, arXiv:2102.03639.

See Also

set.global(), fclust(), PARAM, PARAM.org.

Examples

Run this code
# NOT RUN {
library(MixfMRI, quietly = TRUE)
library(EMCluster, quietly = TRUE)
# .FC.CT$algorithm <- "em"
# .FC.CT$model.X <- "V"
# .FC.CT$ignore.X <- TRUE
.FC.CT$check.X.unit <- FALSE

### Test toy1.
set.seed(1234)
X.gbd <- toy1$X.gbd
PV.gbd <- toy1$PV.gbd
PARAM <- set.global(X.gbd, PV.gbd, K = 2)
PARAM.new <- initial.em.gbd(PARAM)
PARAM.toy1 <- em.step.gbd(PARAM.new)
id.toy1 <- .MixfMRIEnv$CLASS.gbd
print(PARAM.toy1$ETA)
RRand(toy1$CLASS.gbd, id.toy1)

# }
# NOT RUN {
.rem <- function(){

  ### Test toy2.
  set.seed(1234)
  X.gbd <- toy2$X.gbd
  PV.gbd <- toy2$PV.gbd
  PARAM <- set.global(X.gbd, PV.gbd, K = 3)
  PARAM.new <- initial.em.gbd(PARAM)
  PARAM.toy2 <- em.step.gbd(PARAM.new)
  id.toy2 <- .MixfMRIEnv$CLASS.gbd
  print(PARAM.toy2$ETA)
  RRand(toy2$CLASS.gbd, id.toy2)

}
# }

Run the code above in your browser using DataLab