calculate_shape_statistics#

calculate_shape_statistics(pca: PCA, data: DataFrame, ref_data: DataFrame, components: int, label: str = 'shcoeffs') DataFrame[source]#

Perform two-sample Kolmogorov-Smirnov test for goodness of fit on shapes.

Parameters:
  • pca – Fit PCA object.

  • data – Sample data, with shape coefficients as columns.

  • ref_data (pd.DataFrame) – References data, with shape coefficients as columns.

  • components – Number of shape coefficients components.

  • label – Label for shape coefficients columns.

Returns:

Kolmogorov-Smirnov statistics and p-values for each component.