MCPcopy Create free account
hub / github.com/PythonOT/POT / __init__

Method __init__

ot/utils.py:1094–1127  ·  view source on GitHub ↗
(
        self,
        potentials=None,
        value=None,
        value_linear=None,
        value_quad=None,
        plan=None,
        log=None,
        backend=None,
        sparse_plan=None,
        lazy_plan=None,
        status=None,
        batch_size=100,
    )

Source from the content-addressed store, hash-verified

1092 """
1093
1094 def __init__(
1095 self,
1096 potentials=None,
1097 value=None,
1098 value_linear=None,
1099 value_quad=None,
1100 plan=None,
1101 log=None,
1102 backend=None,
1103 sparse_plan=None,
1104 lazy_plan=None,
1105 status=None,
1106 batch_size=100,
1107 ):
1108 self._potentials = potentials
1109 self._value = value
1110 self._value_linear = value_linear
1111 self._value_quad = value_quad
1112 self._plan = plan
1113 self._log = log
1114 self._sparse_plan = sparse_plan
1115 self._lazy_plan = lazy_plan
1116 self._backend = backend if backend is not None else NumpyBackend()
1117 self._status = status
1118 self._batch_size = batch_size
1119
1120 # I assume that other solvers may return directly
1121 # some primal objects?
1122 # In the code below, let's define the main quantities
1123 # that may be of interest to users.
1124 # An OT solver returns an object that inherits from OTResult
1125 # (e.g. SinkhornOTResult) and implements the relevant
1126 # methods (e.g. "plan" and "lazy_plan" but not "sparse_plan", etc.).
1127 # log is a dictionary containing potential information about the solver
1128
1129 # Dual potentials --------------------------------------------
1130

Callers

nothing calls this directly

Calls 1

NumpyBackendClass · 0.85

Tested by

no test coverage detected