vampire.analysis.pca_transform_contours

vampire.analysis.pca_transform_contours(contours, mean_contour, principal_directions)[source]

Transform contour coordinates to principal directions in the PC space.

Parameters
contoursndarray

Object contours, with shape (num_contour, 2*num_points).

mean_contourndarray

Mean contour used to mean-center object contours.

principal_directionsndarray

Loadings, weights, principal directions, principal axes, eigenvector of covariance matrix of mean-subtracted contours, with shape (2*num_points, 2*num_points).

Returns
principal_componentsndarray

PC score, principal components, coordinates of mean-subtracted contours in their principal directions, with shape (num_contours, 2*num_points).