onmanifold {GeodRegr}R Documentation

Manifold check and projection

Description

Checks whether each data point in y is on the given manifold, and if not, provides a modified version of y where each column has been projected onto the manifold.

Usage

onmanifold(manifold, y)

Arguments

manifold

Type of manifold ('euclidean', 'sphere', 'hyperbolic', or 'kendall').

y

A vector, matrix, or data frame whose columns should represent points on the manifold.

Value

A named list containing

on

a logical vector describing whether or not each column of y is on the manifold.

data

a matrix of data frame of the same dimensions as y; each column of y has been projected onto the manifold.

Author(s)

Ha-Young Shin

Examples

y1 <- matrix(rnorm(10), ncol = 2)
y1 <- y1[, 1] + (1i) * y1[, 2]
y2 <- matrix(rnorm(10), ncol = 2)
y2 <- y2[, 1] + (1i) * y2[, 2]
y3 <- matrix(rnorm(10), ncol = 2)
y3 <- y3[, 1] + (1i) * y3[, 2]
y3 <- (y3 - mean(y3)) / norm(y3 - mean(y3), type = '2') # project onto preshape space
y <- matrix(c(y1, y2, y3), ncol = 3)
onmanifold('kendall', y)


[Package GeodRegr version 0.2.0 Index]