findSphereClusterCenter: Find a center for points on the unit sphere

View source: R/TrajectoryGeometry.R

findSphereClusterCenterR Documentation

Find a center for points on the unit sphere

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

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

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

AnnaLaddach/TrajectoryGeometry documentation built on Feb. 23, 2024, 2:24 p.m.