agi.foundation
(agi.foundation.core-2020r1.jar)

## Class SphericalDescriptiveStatistics

• ```public final class SphericalDescriptiveStatistics
extends Object```
Provides descriptive statistic methods suited for spherical data. Since the spherical surface is embedded in Cartesian space, the data set is provided as a list of `UnitCartesian` directions locating the data points on the unit sphere. The algorithms are based on the mathematics found in "Directional Statistics" by Mardia and Jupp.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`static double` ```dispersionAboutPosition(List<UnitCartesian> dataList, UnitSpherical position)```
Calculates the dispersion about a given input position.
`static UnitSpherical` `meanDirection(List<UnitCartesian> dataList)`
Calculates the mean direction of a list of data.
`static double` `meanResultantLength(List<UnitCartesian> dataList)`
Calculates the mean resultant length of a list of data.
`static Spherical` `meanVector(List<UnitCartesian> dataList)`
Computes the mean vector.
`static UnitSpherical` `medianDirection(List<UnitCartesian> dataList)`
Calculates the median direction of the data by using a simplex heuristic optimizer.
`static UnitSpherical` ```medianDirection(List<UnitCartesian> dataList, SphericalMedianCalculationMethod calculationMethod)```
Calculates the median direction of the data by using a simplex heuristic optimizer.
`static UnitSpherical` ```medianDirection(List<UnitCartesian> dataList, SphericalMedianCalculationMethod calculationMethod, MultivariableFunctionSolverResults[] results)```
Calculates the median direction of the data by using a simplex heuristic optimizer.
`static Matrix3By3Symmetric` `scatterMatrix(List<UnitCartesian> dataList)`
Calculates the scatter matrix based upon the input data.
`static double` `variance(List<UnitCartesian> dataList)`
Calculates the variance of a list of data.
• ### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Method Detail

• #### meanVector

```@Nonnull
public static Spherical meanVector(@Nonnull
List<UnitCartesian> dataList)```
Computes the mean vector.
Parameters:
`dataList` - The list of data to use to calculate the mean vector.
Returns:
The mean vector.
Throws:
`ArgumentNullException` - Thrown when `dataList` is `null`.
`ArgumentException` - Thrown when `dataList` is empty.
• #### meanResultantLength

```public static double meanResultantLength(@Nonnull
List<UnitCartesian> dataList)```
Calculates the mean resultant length of a list of data.

The output range is 0 ≤ R ≤ 1.

Parameters:
`dataList` - The list of data to use to calculate the mean resultant length.
Returns:
The mean resultant length.
• #### meanDirection

```@Nonnull
public static UnitSpherical meanDirection(@Nonnull
List<UnitCartesian> dataList)```
Calculates the mean direction of a list of data.
Parameters:
`dataList` - The list of data to use to calculate the mean direction.
Returns:
The mean direction.
• #### medianDirection

```@Nonnull
public static UnitSpherical medianDirection(@Nonnull
List<UnitCartesian> dataList)```
Calculates the median direction of the data by using a simplex heuristic optimizer. The calculation method of the optimizer defaults to `SphericalMedianCalculationMethod.NORMALIZED_SPATIAL_MEDIAN` which minimizes the normalized spatial median function.
Parameters:
`dataList` - The list of data to use to calculate the median direction.
Returns:
The median direction.
• #### medianDirection

```@Nonnull
public static UnitSpherical medianDirection(@Nonnull
List<UnitCartesian> dataList,
@Nonnull
SphericalMedianCalculationMethod calculationMethod)```
Calculates the median direction of the data by using a simplex heuristic optimizer. The optimizer minimizes the normalized spatial median function or the embedded R^3 arc distance function to compute the median.
Parameters:
`dataList` - The list of data to use to calculate the median direction.
`calculationMethod` - The function to minimize in order to calculate the spherical median. See `SphericalMedianCalculationMethod` for more information.
Returns:
The median direction.
• #### medianDirection

```@Nonnull
public static UnitSpherical medianDirection(@Nonnull
List<UnitCartesian> dataList,
@Nonnull
SphericalMedianCalculationMethod calculationMethod,
@Nonnull
MultivariableFunctionSolverResults[] results)```
Calculates the median direction of the data by using a simplex heuristic optimizer. The optimizer minimizes the normalized spatial median function or the embedded R^3 arc distance function to compute the median.
Parameters:
`dataList` - The list of data to use to calculate the median direction.
`calculationMethod` - The function to minimize in order to calculate the spherical median. See `SphericalMedianCalculationMethod` for more information.
`results` - The results of the optimizer. This data structure contains any warnings from the optimizer.
Returns:
The median direction.
• #### variance

```public static double variance(@Nonnull
List<UnitCartesian> dataList)```
Calculates the variance of a list of data.

The output range is 0 ≤ V ≤ 1.

Parameters:
`dataList` - The list of data to use to calculate the variance.
Returns:
The variance.

```public static double dispersionAboutPosition(@Nonnull
List<UnitCartesian> dataList,
@Nonnull
UnitSpherical position)```
Calculates the dispersion about a given input position.
Parameters:
`dataList` - The list of data to use to calculate the dispersion.
`position` - The position about which the dispersion should be calculated.
Returns:
The dispersion about the given input position.
• #### scatterMatrix

```@Nonnull
public static Matrix3By3Symmetric scatterMatrix(@Nonnull
List<UnitCartesian> dataList)```
Calculates the scatter matrix based upon the input data.
Parameters:
`dataList` - The list of data to use to calculate the scatter matrix.
Returns:
The scatter matrix, presented in `Cartesian` space.