@@ -54,41 +54,28 @@ def wda(X,y,p=2,reg=1,k=10,solver = None,maxiter=100,verbose=0):
54
54
55
55
Parameters
56
56
----------
57
- a : np.ndarray (ns,)
58
- samples weights in the source domain
59
- b : np.ndarray (nt,)
60
- samples in the target domain
61
- M : np.ndarray (ns,nt)
62
- loss matrix
63
- reg : float
64
- Regularization term >0
65
- numItermax : int, optional
66
- Max number of iterations
67
- stopThr : float, optional
68
- Stop threshol on error (>0)
69
- verbose : bool, optional
57
+ X : numpy.ndarray (n,d)
58
+ Training samples
59
+ y : np.ndarray (n,)
60
+ labels for training samples
61
+ p : int, optional
62
+ size of dimensionnality reduction
63
+ reg : float, optional
64
+ Regularization term >0 (entropic regularization)
65
+ solver : str, optional
66
+ None for steepest decsent or 'TrustRegions' for trust regions algorithm
67
+ else shoudl be a pymanopt.sovers
68
+ verbose : int, optional
70
69
Print information along iterations
71
- log : bool, optional
72
- record log if True
70
+
73
71
74
72
75
73
Returns
76
74
-------
77
- gamma : (ns x nt ) ndarray
75
+ P : (d x p ) ndarray
78
76
Optimal transportation matrix for the given parameters
79
- log : dict
80
- log dictionary return only if log==True in parameters
81
-
82
- Examples
83
- --------
84
-
85
- >>> import ot
86
- >>> a=[.5,.5]
87
- >>> b=[.5,.5]
88
- >>> M=[[0.,1.],[1.,0.]]
89
- >>> ot.sinkhorn(a,b,M,1)
90
- array([[ 0.36552929, 0.13447071],
91
- [ 0.13447071, 0.36552929]])
77
+ proj : fun
78
+ projectiuon function including mean centering
92
79
93
80
94
81
References
0 commit comments