cot.ot_profile

cot.ot_profile(DA, SB, C, eps, p=1)[source]

This function computes the approximated Optimal Transport profile (OT-Profile) [3] between two discrete distributions by leveraging the LMR algorithm [1]. The OT-profile is a function of the cost of α-optimal paritial transport cost as the transported mass α the variables. This returns the OT-profile as a 2 by k array, where the first row represents the amount of transported mass and the second row represents the corresponding cost of optimal partial transport.

Parameters:
  • DA (numpy array) – A n by 1 array, each DA(i) represent the mass of demand on ith type a vertex. The sum of DA should equal to 1.

  • SB (numpy array) – A n by 1 array, each SB(i) represent the mass of supply on ith type b vertex. The sum of SB should equal to 1.

  • C (numpy array) – A n by n cost matrix, each C(i,j) represents the cost between ith type b and jth type a vertex.

  • eps (float) – The additive error of OT-Profile, the value of \(\epsilon\) in paper [3].

Returns:

ot_profile – A 2 by k array, first row represent the amount of transported mass, second row represent the corresponding cost of optimal partial transport.

Return type:

2 by k numpy array

References