cellflow.utils.match_linear¶
- cellflow.utils.match_linear(source_batch, target_batch, cost_fn=<ott.geometry.costs.SqEuclidean object>, epsilon=1.0, scale_cost='mean', tau_a=1.0, tau_b=1.0, threshold=None, **kwargs)[source]¶
Compute solution to a linear OT problem.
- Parameters:
source_batch (
Array) – Source point cloud of shape[n, d].target_batch (
Array) – Target point cloud of shape[m, d].cost_fn (
CostFn|None) – Cost function to use for the linear OT problem.scale_cost (
Union[float,Literal['mean','max_cost','median']]) – Scaling of the cost matrix.tau_a (
float) – Parameter in \((0, 1]\) that defines how unbalanced the problem is in the source distribution. If \(1\), the problem is balanced in the source distribution.tau_b (
float) – Parameter in \((0, 1]\) that defines how unbalanced the problem is in the target distribution. If \(1\), the problem is balanced in the target distribution.threshold (
float|None) – Convergence criterion for the Sinkhorn algorithm.kwargs (
Any) – Additional arguments forott.solvers.linear.sinkhorn.Sinkhorn.
- Return type:
Array- Returns:
: Optimal transport matrix between
'source_batch'and'target_batch'.