locan.process.properties.misc.inertia_moments

locan.process.properties.misc.inertia_moments(points)[source]

Return inertia moments (or principal components) and related properties for the given points. Inertia moments are represented by eigenvalues (and corresponding eigenvectors) of the covariance matrix. Variance_explained represents the eigenvalues normalized to the sum of all eigenvalues. For 2-dimensional data, orientation is the angle (in degrees) between the principal axis with the largest variance and the x-axis. Also, for 2-dimensional data, eccentricity is computed as e=Sqrt(1-M_min/M_max).

Parameters:

points (Union[_Buffer, _SupportsArray[dtype[Any]], _NestedSequence[_SupportsArray[dtype[Any]]], bool, int, float, complex, str, bytes, _NestedSequence[bool | int | float | complex | str | bytes]]) – Coordinates of input points with shape (npoints, ndim).

Returns:

A tuple with eigenvalues, eigenvectors, variance_explained, orientation, eccentricity

Return type:

InertiaMoments

Note

The data is not standardized.