Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

splitsNetwork

Phylogenetic Network


Description

splitsNetwork estimates weights for a splits graph from a distance matrix.

Usage

splitsNetwork(dm, splits = NULL, gamma = 0.1, lambda = 1e-06, weight = NULL)

Arguments

dm

A distance matrix.

splits

a splits object, containing all splits to consider, otherwise all possible splits are used

gamma

penalty value for the L1 constraint.

lambda

penalty value for the L2 constraint.

weight

a vector of weights.

Details

splitsNetwork fits non-negative least-squares phylogenetic networks using L1 (LASSO), L2(ridge regression) constraints. The function minimizes 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 L1 or L2 constraints.

Value

splitsNetwork returns a splits object with a matrix added. The first column contains the indices of the splits, the second column an unconstrained fit without penalty terms and the third column the constrained fit.

Author(s)

References

Efron, Hastie, Johnstone and Tibshirani (2004) Least Angle Regression (with discussion) Annals of Statistics 32(2), 407–499

K. P. Schliep (2009). Some Applications of statistical phylogenetics (PhD Thesis)

See Also

Examples

data(yeast)
dm <- dist.ml(yeast)
fit <- splitsNetwork(dm)
net <- as.networx(fit)
plot(net, "2D")
write.nexus.splits(fit)

phangorn

Phylogenetic Reconstruction and Analysis

v2.7.0
GPL (>= 2)
Authors
Klaus Schliep [aut, cre] (<https://orcid.org/0000-0003-2941-0161>), Emmanuel Paradis [aut] (<https://orcid.org/0000-0003-3092-2199>), Leonardo de Oliveira Martins [aut] (<https://orcid.org/0000-0001-5247-1320>), Alastair Potts [aut], Tim W. White [aut], Cyrill Stachniss [ctb], Michelle Kendall [ctb], Keren Halabi [ctb], Richel Bilderbeek [ctb], Kristin Winchell [ctb], Liam Revell [ctb], Mike Gilchrist [ctb], Jeremy Beaulieu [ctb], Brian O'Meara [ctb], Long Qu [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.