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

Function benchmark_naive

examples/backends/plot_ot_batch.py:123–129  ·  view source on GitHub ↗
(samples_source, samples_target)

Source from the content-addressed store, hash-verified

121
122
123def benchmark_naive(samples_source, samples_target):
124 start = perf_counter()
125 for i in range(n_problems):
126 M = ot.dist(samples_source[i], samples_target[i])
127 res = ot.solve(M, reg=reg, max_iter=max_iter, tol=tol, reg_type="entropy")
128 end = perf_counter()
129 return end - start
130
131
132def benchmark_batch(samples_source, samples_target):

Callers 1

plot_ot_batch.pyFile · 0.85

Calls 1

solveMethod · 0.45

Tested by

no test coverage detected