moscot.base.output.BaseSolverOutput#

class moscot.base.output.BaseSolverOutput[source]#

Base class for all solver outputs.

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.

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].