You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- :math:`\Omega_e` is the entropic regularization term :math:`\Omega_e(\gamma)=\sum_{i,j} \gamma_{i,j}\log(\gamma_{i,j})`
33
34
- :math:`\Omega_g` is the group lasso regulaization term :math:`\Omega_g(\gamma)=\sum_{i,c} \|\gamma_{i,\mathcal{I}_c}\|^{1/2}_1` where :math:`\mathcal{I}_c` are the index of samples from class c in the source domain.
34
35
- a and b are source and target weights (sum to 1)
35
-
36
+
36
37
The algorithm used for solving the problem is the generalised conditional gradient as proposed in [5]_ [7]_
37
-
38
-
38
+
39
+
39
40
Parameters
40
41
----------
41
42
a : np.ndarray (ns,)
42
43
samples weights in the source domain
43
44
labels_a : np.ndarray (ns,)
44
-
labels of samples in the source domain
45
+
labels of samples in the source domain
45
46
b : np.ndarray (nt,)
46
47
samples in the target domain
47
48
M : np.ndarray (ns,nt)
48
-
loss matrix
49
+
loss matrix
49
50
reg: float
50
51
Regularization term for entropic regularization >0
51
52
eta: float, optional
52
-
Regularization term for group lasso regularization >0
53
+
Regularization term for group lasso regularization >0
53
54
numItermax: int, optional
54
55
Max number of iterations
55
56
numInnerItermax: int, optional
56
57
Max number of iterations (inner sinkhorn solver)
57
58
stopInnerThr: float, optional
58
-
Stop threshold on error (inner sinkhorn solver) (>0)
59
+
Stop threshold on error (inner sinkhorn solver) (>0)
59
60
verbose : bool, optional
60
61
Print information along iterations
61
62
log : bool, optional
62
-
record log if True
63
-
64
-
63
+
record log if True
64
+
65
+
65
66
Returns
66
67
-------
67
68
gamma: (ns x nt) ndarray
68
69
Optimal transportation matrix for the given parameters
69
70
log: dict
70
-
log dictionary return only if log==True in parameters
71
-
72
-
71
+
log dictionary return only if log==True in parameters
72
+
73
+
73
74
References
74
75
----------
75
-
76
+
76
77
.. [5] N. Courty; R. Flamary; D. Tuia; A. Rakotomamonjy, "Optimal Transport for Domain Adaptation," in IEEE Transactions on Pattern Analysis and Machine Intelligence , vol.PP, no.99, pp.1-1
77
78
.. [7] Rakotomamonjy, A., Flamary, R., & Courty, N. (2015). Generalized conditional gradient: analysis of convergence and applications. arXiv preprint arXiv:1510.06567.
0 commit comments