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

Function compute_loss

ot/dr.py:516–517  ·  view source on GitHub ↗
(M, pi, reg)

Source from the content-addressed store, hash-verified

514 )
515
516 def compute_loss(M, pi, reg):
517 return np.sum(M * pi) + reg * np.sum(pi * (np.log(pi) - 1))
518
519 def grassmann_distance(U1, U2):
520 proj = U1.T @ U2

Callers 1

ewcaFunction · 0.85

Calls 2

sumMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected