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

Method delta_Omega

ot/smooth.py:211–215  ·  view source on GitHub ↗
(self, X)

Source from the content-addressed store, hash-verified

209 """Squared L2 regularization"""
210
211 def delta_Omega(self, X):
212 max_X = np.maximum(X, 0)
213 val = np.sum(max_X**2, axis=0) / (2 * self.gamma)
214 G = max_X / self.gamma
215 return val, G
216
217 def max_Omega(self, X, b):
218 G = projection_simplex(X / (b * self.gamma), axis=0)

Callers 4

dual_obj_gradFunction · 0.45
get_plan_from_dualFunction · 0.45
delta_omega_funcFunction · 0.45
delta_omega_gradFunction · 0.45

Calls 2

maximumMethod · 0.45
sumMethod · 0.45

Tested by 2

delta_omega_funcFunction · 0.36
delta_omega_gradFunction · 0.36