ott.geometry.low_rank.LRCGeometry.compute_max_cost
ott.geometry.low_rank.LRCGeometry.compute_max_cost#
- LRCGeometry.compute_max_cost()[source]#
Compute the maximum of the
cost_matrix.Three cases are taken into account:
If the number of samples of
cost_1andcost_2are both smaller than 1024 and ifbatch_sizeis None, thecost_matrixis computed to obtain its maximum entry.If one of the number of samples of
cost_1orcost_2is larger than 1024 and ifbatch_sizeis None, then the maximum of the cost matrix is calculated by batch. The batches are created on the longest axis of the cost matrix and their size is fixed to 1024.If
batch_sizeis provided as a float, then the maximum of the cost matrix is calculated by batch. The batches are created on the longest axis of the cost matrix and their size if fixed bybatch_size.
- Return type
- Returns
Maximum of the cost matrix.