findSphereClusterCenter: Find a center for points on the unit sphere

Description Usage Arguments Value Examples

View source: R/TrajectoryGeometry.R

Description

This function takes a set of points on the d-1 sphere in d-space and finds a center for these. Depending on choice of statistic, this center is a point on the sphere which minimizes either the median distance, the mean distance or the maximum distance of the center to the given points. "Distance" here is taken to mean angle between the points, i.e., arccos of their dot product.

Usage

1
findSphereClusterCenter(points, statistic, normalize = FALSE)

Arguments

points

- A set of n points on the (d-1) sphere given as an n x d matrix.

statistic

- The statistic to be minimized. Allowable values are 'median','mean' or 'max'.

normalize

- If this is set to TRUE, the function will start by normalizing the input points.

Value

This returns a point in dimension d given as a vector.

Examples

1
2
projection = projectPathToSphere(straight_path)
center = findSphereClusterCenter(projection,'mean')

AnnaLaddach/TrajectoryGeometry documentation built on Jan. 28, 2021, 10:41 a.m.