find.best: Find the Best Solution of phyclust

View source: R/f_find_best.r

find.bestR Documentation

Find the Best Solution of phyclust

Description

Based on input initialization procedures and methods, this function tries to find the best solution in terms of the highest log-likelihood value.

Usage

find.best(X, K, EMC = .EMC, manual.id = NULL, byrow = TRUE,
    init.procedure = .init.procedure, init.method = .init.method,
    file.tmp = NULL, visible = FALSE, save.all = FALSE)

Arguments

X

nid/sid matrix with N rows/sequences and L columns/sites.

K

number of clusters.

EMC

EM control.

manual.id

manually input class ids.

byrow

advanced option for X, default = TRUE.

init.procedure

customized initialization procedures.

init.method

customized initialization methods.

file.tmp

a file for saving temporary results.

visible

TRUE for reporting iterations.

save.all

TRUE for saving all results.

Details

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

Note: gaps - are not supported yet, drop them from data.

EMC contains all options used for EM algorithms.

manual.id manually input class ids as an initialization only for the initialization method, 'manualMu'.

byrow used in bootstraps to avoid transposing matrix 'X'. If FALSE, then the 'X' should be have the dimension L\times K.

init.procedure and init.method are methods for searching the best result. This function will try all combinations of these two options.

file.tmp is used to save temporary results due to long computing. If NULL, there will no saving in each combinations.

Value

An list with class phyclust will be returned containing several elements, see phyclust for detail.

ToDo(s)

  • implement codes for gaps -.

Author(s)

Wei-Chen Chen wccsnow@gmail.com

References

Phylogenetic Clustering Website: https://snoweye.github.io/phyclust/

See Also

.EMC, .EMControl. phyclust.

Examples

## Not run: 
library(phyclust, quiet = TRUE)

set.seed(1234)
EMC.1 <- .EMControl(exhaust.iter = 1, short.iter = 5, EM.iter = 5)
(ret.1 <- find.best(seq.data.toy$org, 2, EMC = EMC.1))

## End(Not run)

snoweye/phyclust documentation built on Sept. 12, 2023, 5 a.m.