Check out the Hyperspy Workshop May 13-17, 2024 Online

correlate_learning_segments#

LearningSegment.correlate_learning_segments(corr_th_factors=0.4, corr_th_loadings=0.4)[source]#

Iterates through the factors and loadings and calculates the normalized cross-correlation between all factors and all loadings. Factors and loadings are summed if the correlations of both factors and loadings exceed the given thresholds.

Parameters:
  • corr_th_factors (float) – Correlation threshold for factors. Must be between -1 and 1. Factors and loadings are summed if both factors and loadings have normalized cross-correlations above corr_th_factors and corr_th_loadings, respectively.

  • corr_th_loadings (int, optional) – Correlation threshold for loadings. Must be between -1 and 1.

Returns:

learning_segment – LearningSegment where possibly some factors and loadings have been summed.

Return type:

LearningSegment