Principal Component Analysis

class geoteqpy.PCA(points)

Class to compute the Principal Component Analysis (PCA) of a set of points in 3D space. The PCA is computed using the covariance matrix of the points.

This class is the Parent class of the PCA classes. It is not meant to be used directly.

compute_pca() ndarray
class geoteqpy.SpherePCA(points, radius)

Class to compute the Principal Component Analysis (PCA) of a set of points in 3D space using a sphere to select the points that contribute to the covariance matrix.

compute_pca() ndarray

Compute the covariance matrix and its eigen vectors for each point of the medial axis.

Returns:

Array of the eigen vectors for each point of the medial axis. Shape is (npoints, 3, 3) where npoints is the number of points in the medial axis,

  • [:,0,:] is the first eigen vector,

  • [:,1,:] is the second eigen vector and

  • [:,2,:] is the third eigen vector.

Return type:

np.ndarray

class geoteqpy.KNearestPCA(points, knearest)

Class to compute the Principal Component Analysis (PCA) of a set of points in 3D space using the K-nearest neighbours points to select the points that contribute to the covariance matrix.

compute_pca()

Compute the covariance matrix and its eigen vectors for each point of the medial axis.

Returns:

Array of the eigen vectors for each point of the medial axis. Shape is (npoints, 3, 3) where npoints is the number of points in the medial axis,

  • [:,0,:] is the first eigen vector,

  • [:,1,:] is the second eigen vector and

  • [:,2,:] is the third eigen vector.

Return type:

np.ndarray