sinkhorn_pot: Return the dual potentials for the Sinkhorn distance

View source: R/transport_plan.R

sinkhorn_potR Documentation

Return the dual potentials for the Sinkhorn distance

Description

Return the dual potentials for the Sinkhorn distance

Usage

sinkhorn_pot(
  mass_x,
  mass_y,
  p = 2,
  cost = NULL,
  cost_a = NULL,
  cost_b = NULL,
  ...
)

Arguments

mass_x

The empirical distribution of the first sample

mass_y

The empirical distribution of the second sample

p

The power to raise the cost by

cost

The cost matrix between first and second samples

cost_a

The cost matrix for the first sample

cost_b

The cost matrix for the second sample

...

Additional arguments including

  • epsilon: The fraction of the median cost to use as a penalty

  • niter: Number of iterations to run the Sinkhorn algorithm

  • unbiased: Should the potentials be de-biased TRUE/FALSE

Value

A list with slots "f" and "g", the potentials of the rows and margins, respectively.


approxOT documentation built on May 29, 2024, 3:12 a.m.