splitsNetwork {phangorn} | R Documentation |
splitsNetwork
estimates a splits graph from a distance matrix.
splitsNetwork(dm, gamma=.1, lambda=0.001)
dm |
A distance matrix. |
gamma |
penalty value for the L1 constraint. |
lambda |
penalty value for the L2 constraint. |
splitsNetwork
fits phylogenetic networks using L1, L2 and
non-negativity constraints.
The function minimises the peanlised 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 K.P.Schliep@massey.ac.nz
data(yeast) dm = dist.ml(yeast) fit = splitsNetwork(dm) write.nexus.splits(fit)