View source: R/TrajectoryGeometry.R
findSphereClusterCenter | R Documentation |
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.
findSphereClusterCenter(points, statistic, normalize = FALSE)
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. |
This returns a point in dimension d given as a vector.
projection = projectPathToSphere(straight_path)
center = findSphereClusterCenter(projection,'mean')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.