runEM: Run EM iteratively to convergence

View source: R/EMbasic.R

runEMR Documentation

Run EM iteratively to convergence

Description

Run EM iteratively to convergence

Usage

runEM(
  dataMatrix,
  numClasses,
  convergenceError = 1e-06,
  maxIterations = 100,
  printProgress = FALSE
)

Arguments

dataMatrix

A matrix of methylation or bincount values (reads x position)

numClasses

An integer indicating the number of classes to learn

convergenceError

An float indicating the convergence threshold for stopping iteration

maxIterations

An integer indicating the max number of iterations to perform even if the algorithm has not converged

printProgress

Print messages showing progress of convergence

Value

list of three items: 1) classes: a matrix with optimised classes (class x position) 2) priorProb: a vector with the prior probabilities of each class 3) posteriorProb: a matrix of probabilites of each sample belonging to a particular class (samples x class)


jsemple19/EMclassifieR documentation built on Aug. 12, 2022, 2:57 p.m.