loss: Loss

Description Usage Arguments Value Author(s) Examples

View source: R/others.R

Description

Loss for a given p and V.

Usage

1
loss(manifold, p, V, x, y, estimator, cutoff = NULL)

Arguments

manifold

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

p

A vector (or column matrix) on the manifold.

V

A matrix (or vector) where each column is a vector in the tangent space at p.

x

A matrix or data frame of independent variables; for matrices and data frames, the rows and columns represent the subjects and independent variables, respectively.

y

A matrix or data frame (or vector) whose columns represent points on the manifold.

estimator

M-type estimator ('l2', 'l1', 'huber', or 'tukey').

cutoff

Cutoff parameter for the 'huber' and 'tukey' estimators; should be NULL for the 'l2' or 'l1' estimators.

Value

Loss.

Author(s)

Ha-Young Shin

Examples

1
2
3
4
5
6
y <- matrix(0L, nrow = 3, ncol = 64)
for (i in 1:64) {
  y[, i] <- exp_map('hyperbolic', c(1, 0, 0), c(0, runif(1), runif(1)))
}
intrinsic_mean <- intrinsic_location('hyperbolic', y, 'l2')
loss('hyperbolic', intrinsic_mean, numeric(3), numeric(64), y, 'l2')

GeodRegr documentation built on Sept. 5, 2021, 5:17 p.m.

Related to loss in GeodRegr...