maxfuse.match_utils.match_cells
- maxfuse.match_utils.match_cells(arr1, arr2, base_dist=None, wt_on_base_dist=0, verbose=True)[source]
Get matching between arr1 and arr2 using linear assignment, the distance is 1 - Pearson correlation.
- Parameters:
arr1 (np.array of shape (n_samples1, n_features)) – The first data matrix
arr2 (np.array of shape (n_samples2, n_features)) – The second data matrix
base_dist (None or np.ndarray of shape (n_samples1, n_samples2)) – Baseline distance matrix
wt_on_base_dist (float between 0 and 1) – The final distance matrix to use is (1-wt_on_base_dist) * dist[arr1, arr2] + wt_on_base_dist * base_dist
verbose (bool, default=True) – Whether to print the progress
- Returns:
rows, cols, vals (list) – Each matched pair of rows[i], cols[i], their distance is vals[i]