View source: R/troproj.linsp.R
tropproj.linsp | R Documentation |
Compute projection of data points on a given tropical linear space.
tropproj.linsp(x, V)
x |
a data matrix, of size n x e, with each row an observation. |
V |
a data matrix, of dimension s x e, with each row a basis of tropical linear space. e is the dimension of the tropical space and s is the dimension of the linear space. |
A matrix of projections of all data points.
library(Rfast) n <- 100 e <- 10 sig2 <- 1 s <- 3 x <- rbind(rmvnorm(n, mu = c(5, -5, rep(0, e - 2)), sigma = diag(sig2, e))) V <- matrix(runif(s * e, -10, 10), nrow = s, ncol = e) x_proj <- tropproj.linsp(x, V) head(x_proj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.