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

Function test_gmm_apply_map

test/test_gmm.py:151–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

149
150
151def test_gmm_apply_map():
152 m_s, m_t, C_s, C_t, w_s, w_t = get_gmms()
153 rng = np.random.RandomState(seed=42)
154 x = rng.randn(7, 3)
155
156 for method in ["bary", "rand"]:
157 gmm_ot_apply_map(x, m_s, m_t, C_s, C_t, w_s, w_t, method=method)
158
159 plan = gmm_ot_plan(m_s, m_t, C_s, C_t, w_s, w_t)
160 gmm_ot_apply_map(x, m_s, m_t, C_s, C_t, w_s, w_t, plan=plan)
161
162
163@pytest.mark.skipif(not torch, reason="No torch available")

Callers

nothing calls this directly

Calls 4

gmm_ot_apply_mapFunction · 0.90
gmm_ot_planFunction · 0.90
get_gmmsFunction · 0.85
randnMethod · 0.45

Tested by

no test coverage detected