moscot.backends.ott.GraphOTTOutput#

class moscot.backends.ott.GraphOTTOutput(output, shape)[source]#

Output of OT problems with a graph geometry in the linear term.

Parameters:

Methods

as_linear_operator([scale_by_marginals])

Transform transport_matrix into a linear operator.

chain(outputs[, scale_by_marginals])

Chain subsequent applications of transport_matrix.

plot_costs([last, title, return_fig, ax, ...])

Plot regularized OT costs during the iterations.

plot_errors([last, title, outer_iteration, ...])

Plot errors along iterations.

pull(x[, scale_by_marginals])

Pull mass through the transport_matrix.

push(x[, scale_by_marginals])

Push mass through the transport_matrix.

sparsify(mode[, value, batch_size, ...])

Sparsify the transport_matrix.

to([device])

Transfer self to another compute device.

Attributes

a

Marginals of the source distribution.

b

Marginals of the target distribution.

converged

Whether the solver converged.

cost

Regularized OT cost.

dtype

Underlying data type.

is_linear

Whether the output is a solution to a linear problem.

is_low_rank

Whether the transport_matrix is low-rank.

potentials

Dual potentials \(f\) and \(g\).

rank

Rank of the transport_matrix.

shape

Shape of the transport_matrix.

transport_matrix

Transport matrix of shape [n, m].