a data matrix, of size n x e, with each row an observation vector.
e is the dimension of the tropical space
pcs
a numeric value indicating the order of principal component. (default: 2)
iteration
a list with arguments controlling the iteration of the algorithm.
exhaust
a logical variable indicating if to iterate over all possible combinations of the linear space
based on the given data matrix x. If FALSE, please input a number of iteration for niter.
If TRUE, please enter 0 for niter and this function will iterate over all possible combinations of linear space.
This could be time consuming when x is large. (default: FALSE)
niter
a numeric variable indicating the number of iterations. (default: 100)
ncores
a numeric value indicating the number of threads utilized for multi-cored CPUs. (default: 2)
Value
A list of S3 class "troppca", including:
pc
The principal component as a tropical linear space
obj
The tropical PCA objective, the sum of tropical distance from each point to the projection.
# NOT RUN {library(Rfast)
n <- 100
e <- 10
sig2 <- 1
x <- rbind(rmvnorm(n, mu = c(5, -5, rep(0, e - 2)), sigma = diag(sig2, e)))
troppca_fit <- troppca.linsp(x)
# }# NOT RUN {# }