FWpoint.num.w.reg | R Documentation |
Returns a modified Fermat-Weber point of N points using a gradient based numerical method This method is appropriate for points coming from ultrametrics. The algorithm tries to find a point that minimizes the sum of tropical distances from the samples, but also also tries to find a point that is as close as possible to the space of ultrametrics. The tradeoff between these two objectives is controlled by the penalty parameter. If penalty=0, the method is identical to FWpoint_numerical; it finds the Fermat-Weber point, which may not be an ultrametric. If penalty is very large, the algorithm is trying to find the Fermat-Weber point in the space of ultrametrics.
FWpoint.num.w.reg(datamatrix, penalty = 0)
datamatrix |
matrix of dimension N*e, where N is the number of observations which lie in R^e |
penalty |
positive real number; the regularization rate |
vector; Fermat-Weber point approximation
Georgios Aliatimis g.aliatimis@lancaster.ac.uk
Aliatimis, Georgios, Ruriko Yoshida, Burak Boyaci and James A. Grant (2023). Tropical Logistic Regression on Space of Phylogenetic Trees
D = matrix(c(0,0,0,0,2,5,0,3,1),3,3,TRUE)
FWpoint.num.w.reg(D,1e4) # (0,2,5/3) not ultrametric
FWpoint.num.w.reg(D,1e4) # (0,5/3,5/3) ultrametric
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.