Skip to contents

Calculates the Pearson correlation between the pairwise Euclidean distances of points in two ENA spaces (A and B). For smaller datasets, it computes the exact correlation. For larger datasets, it estimates the correlation using a sampled subset of pairs.

Usage

ena_space_dist_corr(A, B, max_sample_size = 1e+05)

Arguments

A

A matrix or data frame representing the first ENA space (rows as points).

B

A matrix or data frame representing the second ENA space (must have the same number of rows as A).

max_sample_size

Numeric. The maximum number of pairwise distances to compute. If the total possible pairs exceeds this value, sampling is used. Default is 100,000.

Value

A numeric value representing the Pearson correlation.