
phyclust(X, K, EMC = .EMC, manual.id = NULL, label = NULL, byrow = TRUE)
X
, default = TRUE.phyclust
will be returned containing
several elements as the following:X
matrix.X
matrix.X
matrix.K
, sum to 1.Q
andQA
.X
should be a numerical matrix containing sequence data that
can be transfered by code2nid
or code2sid
. EMC
contains all options used for EM algorithms.
manual.id
manually input class ids as an initialization only for
the initialization method, 'manualMu'.
label
indicates the known clusters for labeled sequences which is a
vector with length N
and has values from 0
to K
.
0
indicates clusters are unknown. label = NULL
is for
unsupervised clustering. Only un- and semi-supervised clustering are
implemented.
byrow
used in bootstraps to avoid transposing matrix 'X'. If
FALSE, then the 'X' should be have the dimension $L\times K$.
.EMC
,
.EMControl
,
find.best
,
phyclust.se
.
phyclust.se.update
.X <- seq.data.toy$org
set.seed(1234)
(ret.1 <- phyclust(X, 3))
EMC.2 <- .EMC
EMC.2$substitution.model <- "HKY85"
# the same as EMC.2 <- .EMControl(substitution.model = "HKY85")
(ret.2 <- phyclust(X, 3, EMC = EMC.2))
# for semi-supervised clustering
semi.label <- rep(0, nrow(X))
semi.label[1:3] <- 1
(ret.3 <- phyclust(X, 3, EMC = EMC.2, label = semi.label))
Run the code above in your browser using DataLab