splitsNetwork {phangorn} | R Documentation |
splitsNetwork
estimates a splits graph from a distance matrix.
splitsNetwork(dm, gamma=.1, lambda=1e-6, weight=NULL)
dm |
A distance matrix. |
gamma |
penalty value for the L1 constraint. |
lambda |
penalty value for the L2 constraint. |
weight |
a vector of weights. |
splitsNetwork
fits phylogenetic networks using L1, L2 and
non-negativity constraints.
The function minimises the penalized least squares
beta = sum(dm - X*beta)^2 + lambda |beta|^2_2
with respect to
|beta|_1 = gamma, beta >= 0
where X is a design matrix constructed with designSplits
.
External edges are fitted without constraints.
splitsNetwork
returns a matrix. The first column contains the
indices of the splits, the second column an unconstraint fit
without penalty terms and the third column the constraint fit.
Klaus Schliep klaus.schliep@gmail.com
K. P. Schliep (2009). Some Applications of statistical phylogenetics (PhD Thesis)
data(yeast) dm = dist.ml(yeast) fit = splitsNetwork(dm) write.nexus.splits(fit)