| phyclust.logL {phyclust} | R Documentation |
Log-Likelihood of phyclust
Description
This computes a log-likelihood value of phyclust.
Usage
phyclust.logL(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 |
ret.phyclust |
an object with the class |
K |
number of clusters. |
Eta |
proportion of subpopulations, |
Mu |
centers of subpopulations, dim = |
pi |
equilibrium probabilities, each row sums to 1. |
kappa |
transition and transversion bias. |
Tt |
total evolution time, |
substitution.model |
substitution model. |
identifier |
identifier. |
code.type |
code type. |
label |
label of sequences for semi-supervised clustering. |
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 obtain 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 to
calculate log likelihood (complete-data), even the ret.phyclust
is the result of unsupervised clustering.
Value
This function returns a log-likelihood value of phyclust.
Author(s)
Wei-Chen Chen wccsnow@gmail.com
References
Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/
See Also
Examples
## Not run:
library(phyclust, quiet = TRUE)
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)
phyclust.logL(X, ret.phyclust = ret.1)
# For semi-supervised clustering.
semi.label <- rep(0, nrow(X))
semi.label[1:3] <- 1
phyclust.logL(X, ret.phyclust = ret.1, label = semi.label)
## End(Not run)