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

Function test_mapping_transport_class_specific_seed

test/test_da.py:646–654  ·  view source on GitHub ↗
(nx)

Source from the content-addressed store, hash-verified

644@pytest.skip_backend("jax")
645@pytest.skip_backend("tf")
646def test_mapping_transport_class_specific_seed(nx):
647 # check that it does not crash when derphi is very close to 0
648 ns = 20
649 nt = 30
650 rng = np.random.RandomState(39)
651 Xs, ys = make_data_classif("3gauss", ns, random_state=rng)
652 Xt, yt = make_data_classif("3gauss2", nt, random_state=rng)
653 otda = ot.da.MappingTransport(kernel="gaussian", bias=False)
654 otda.fit(Xs=nx.from_numpy(Xs), Xt=nx.from_numpy(Xt))
655
656
657@pytest.skip_backend("jax")

Callers

nothing calls this directly

Calls 3

fitMethod · 0.95
make_data_classifFunction · 0.90
from_numpyMethod · 0.80

Tested by

no test coverage detected