maxfuse.match_utils.address_matching_redundancy
- maxfuse.match_utils.address_matching_redundancy(matching, order=(1, 2))[source]
Make a potentially multiple-to-multiple matching to an one-to-one matching according to order.
- Parameters:
matching (list of length three) – rows, cols, vals = matching: list Each matched pair of rows[i], cols[i], their score (the larger, the better) is vals[i]
order (None or (1, 2) or (2, 1)) – If None, do nothing; If (1, 2), then the redundancy is addressed by making matching an injective map from the first dataset to the second; if (2, 1), do the other way around.
- Returns:
rows, cols, vals (list) – Each matched pair of rows[i], cols[i], their score is vals[i].