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

Function benchmark_batch

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

Source from the content-addressed store, hash-verified

130
131
132def benchmark_batch(samples_source, samples_target):
133 start = perf_counter()
134 M_batch = ot.dist_batch(samples_source, samples_target)
135 res_batch = ot.solve_batch(
136 M=M_batch, reg=reg, max_iter=max_iter, tol=tol, reg_type="entropy"
137 )
138 end = perf_counter()
139 return end - start
140
141
142time_naive = benchmark_naive(samples_source, samples_target)

Callers 1

plot_ot_batch.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected