tropproj.linsp: Projection on Tropical Linear Space

View source: R/troproj.linsp.R

tropproj.linspR Documentation

Projection on Tropical Linear Space

Description

Compute projection of data points on a given tropical linear space.

Usage

tropproj.linsp(x, V)

Arguments

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.

Value

A matrix of projections of all data points.

Examples

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)

HoujieWang/Rtropical documentation built on May 18, 2022, 11:56 a.m.