1313@pytest .mark .skipif (nogo , reason = "Missing modules (autograd or pymanopt)" )
1414def test_fda ():
1515
16- n = 90 # nb samples in source and target datasets
16+ n_samples = 90 # nb samples in source and target datasets
1717 np .random .seed (0 )
1818
19- # generate circle dataset
20- xs , ys = ot .datasets .get_data_classif ('gaussrot' , n )
19+ # generate gaussian dataset
20+ xs , ys = ot .datasets .get_data_classif ('gaussrot' , n_samples )
2121
22- nbnoise = 8
22+ n_features_noise = 8
2323
24- xs = np .hstack ((xs , np .random .randn (n , nbnoise )))
24+ xs = np .hstack ((xs , np .random .randn (n_samples , n_features_noise )))
2525
2626 p = 1
2727
@@ -35,20 +35,15 @@ def test_fda():
3535@pytest .mark .skipif (nogo , reason = "Missing modules (autograd or pymanopt)" )
3636def test_wda ():
3737
38- n = 100 # nb samples in source and target datasets
39- nz = 0.2
38+ n_samples = 100 # nb samples in source and target datasets
4039 np .random .seed (0 )
4140
42- # generate circle dataset
43- t = np .random .rand (n ) * 2 * np .pi
44- ys = np .floor ((np .arange (n ) * 1.0 / n * 3 )) + 1
45- xs = np .concatenate (
46- (np .cos (t ).reshape ((- 1 , 1 )), np .sin (t ).reshape ((- 1 , 1 ))), 1 )
47- xs = xs * ys .reshape (- 1 , 1 ) + nz * np .random .randn (n , 2 )
41+ # generate gaussian dataset
42+ xs , ys = ot .datasets .get_data_classif ('gaussrot' , n_samples )
4843
49- nbnoise = 8
44+ n_features_noise = 8
5045
51- xs = np .hstack ((xs , np .random .randn (n , nbnoise )))
46+ xs = np .hstack ((xs , np .random .randn (n_samples , n_features_noise )))
5247
5348 p = 2
5449
0 commit comments