Learn R Programming

phyclust (version 0.1-9)

phyclust.em.step: One EM-step of phyclust

Description

This is a single EM-step of phyclust.

Usage

phyclust.em.step(X, ret.phyclust = NULL, K = NULL, Eta = NULL,
    Mu = NULL, pi = NULL, kappa = NULL, Tt = NULL,
    substitution.model = NULL, identifier = NULL, code.type = NULL,
    label = NULL)

Arguments

X
nid/sid matrix with $N$ rows/sequences and $L$ columns/sites.
ret.phyclust
an object with the class phyclust.
K
number of clusters.
Eta
proportion of subpopulations, $\eta_k$, length = K, sum to 1.
Mu
centers of subpopulations, dim = $K\times L$, each row is a center.
pi
equilibrium probabilities, each row sums to 1.
kappa
transition and transversion bias.
Tt
total evolution time, $t$.
substitution.model
substitution model.
identifier
identifier.
code.type
code type.
label
label of sequences for semi-supervised clustering.

Value

  • This function return an object with class phyclust.

Details

X should be a numerical matrix containing sequence data that can be transfered by code2nid or code2sid.

Either input ret.phyclust or all other arguments for this function. ret.phyclust can be obtained either from an EM iteration of phyclust or from a M step of phyclust.m.step.

If label is inputted, the label information will be used the EM-step, even the ret.phyclust is the result of unsupervised clustering.

References

Phylogenetic Clustering Website: http://thirteen-01.stat.iastate.edu/snoweye/phyclust/

See Also

phyclust, phyclust.e.step, phyclust.m.step.

Examples

Run this code
set.seed(1234)
EMC.1 <- .EMC
EMC.1$EM.iter <- 1
# the same as EMC.1 <- .EMControl(EM.iter = 1)
X <- seq.data.toy$org

ret.1 <- phyclust(X, 2, EMC = EMC.1)
ret.2 <- phyclust.em.step(X, ret.phyclust = ret.1)
str(ret.2)

# For semi-supervised clustering.
semi.label <- rep(0, nrow(X))
semi.label[1:3] <- 1
ret.3 <- phyclust.em.step(X, ret.phyclust = ret.1, label = semi.label)
str(ret.3)

Run the code above in your browser using DataLab