A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pythonot.github.io/auto_examples/unbalanced-partial/../../gen_modules/ot.factored.html below:

Website Navigation


ot.factored — POT Python Optimal Transport 0.9.5 documentation

ot.factored

Factored OT solvers (low rank, cost or OT plan)

Functions
ot.factored.factored_optimal_transport(Xa, Xb, a=None, b=None, reg=0.0, r=100, X0=None, stopThr=1e-07, numItermax=100, verbose=False, log=False, **kwargs)[source]

Solves factored OT problem and return OT plans and intermediate distribution

This function solve the following OT problem [40]_

\[\mathop{\arg \min}_\mu \quad W_2^2(\mu_a,\mu)+ W_2^2(\mu,\mu_b)\]

where :

And returns the two OT plans between

Note

This function is backend-compatible and will work on arrays from all compatible backends. But the algorithm uses the C++ CPU backend which can lead to copy overhead on GPU arrays.

Uses the conditional gradient algorithm to solve the problem proposed in [39].

Parameters:
  • Xa ((ns,d) array-like, float) – Source samples

  • Xb ((nt,d) array-like, float) – Target samples

  • a ((ns,) array-like, float) – Source histogram (uniform weight if empty list)

  • b ((nt,) array-like, float) – Target histogram (uniform weight if empty list))

  • numItermax (int, optional) – Max number of iterations

  • stopThr (float, optional) – Stop threshold on the relative variation (>0)

  • verbose (bool, optional) – Print information along iterations

  • log (bool, optional) – record log if True

Returns:
  • Ga (array-like, shape (ns, r)) – Optimal transportation matrix between source and the intermediate distribution

  • Gb (array-like, shape (r, nt)) – Optimal transportation matrix between the intermediate and target distribution

  • X (array-like, shape (r, d)) – Support of the intermediate distribution

  • log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status

References

ot.factored.factored_optimal_transport(Xa, Xb, a=None, b=None, reg=0.0, r=100, X0=None, stopThr=1e-07, numItermax=100, verbose=False, log=False, **kwargs)[source]

Solves factored OT problem and return OT plans and intermediate distribution

This function solve the following OT problem [40]_

\[\mathop{\arg \min}_\mu \quad W_2^2(\mu_a,\mu)+ W_2^2(\mu,\mu_b)\]

where :

And returns the two OT plans between

Note

This function is backend-compatible and will work on arrays from all compatible backends. But the algorithm uses the C++ CPU backend which can lead to copy overhead on GPU arrays.

Uses the conditional gradient algorithm to solve the problem proposed in [39].

Parameters:
  • Xa ((ns,d) array-like, float) – Source samples

  • Xb ((nt,d) array-like, float) – Target samples

  • a ((ns,) array-like, float) – Source histogram (uniform weight if empty list)

  • b ((nt,) array-like, float) – Target histogram (uniform weight if empty list))

  • numItermax (int, optional) – Max number of iterations

  • stopThr (float, optional) – Stop threshold on the relative variation (>0)

  • verbose (bool, optional) – Print information along iterations

  • log (bool, optional) – record log if True

Returns:
  • Ga (array-like, shape (ns, r)) – Optimal transportation matrix between source and the intermediate distribution

  • Gb (array-like, shape (r, nt)) – Optimal transportation matrix between the intermediate and target distribution

  • X (array-like, shape (r, d)) – Support of the intermediate distribution

  • log (dict, optional) – If input log is true, a dictionary containing the cost and dual variables and exit status

References


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4