We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3797781 commit 2eaee96Copy full SHA for 2eaee96
ot/__init__.py
@@ -1,4 +1,8 @@
1
-"""Python Optimal Transport toolbox"""
+"""Python Optimal Transport toolbox
2
+
3
4
5
+"""
6
7
8
# All submodules and packages
ot/bregman.py
@@ -508,11 +508,11 @@ def geometricMean(alldistribT):
508
return np.exp(np.mean(np.log(alldistribT),axis=1))
509
510
def projR(gamma,p):
511
- #return np.dot(np.diag(p/np.maximum(np.sum(gamma,axis=1),1e-10)),gamma)
+ """return the KL projection on the row constrints """
512
return np.multiply(gamma.T,p/np.maximum(np.sum(gamma,axis=1),1e-10)).T
513
514
def projC(gamma,q):
515
- #return (np.dot(np.diag(q/np.maximum(np.sum(gamma,axis=0),1e-10)),gamma.T)).T
+ """return the KL projection on the column constrints """
516
return np.multiply(gamma,q/np.maximum(np.sum(gamma,axis=0),1e-10))
517
518
ot/utils.py
@@ -63,10 +63,10 @@ def dist(x1,x2=None,metric='sqeuclidean'):
63
matrix with n2 samples of size d (if None then x2=x1)
64
metric : str, fun, optional
65
name of the metric to be computed (full list in the doc of scipy), If a string,
66
- the distance function can be ‘braycurtis’, ‘canberra’, ‘chebyshev’, ‘cityblock’,
67
- ‘correlation’, ‘cosine’, ‘dice’, ‘euclidean’, ‘hamming’, ‘jaccard’, ‘kulsinski’,
68
- ‘mahalanobis’, ‘matching’, ‘minkowski’, ‘rogerstanimoto’, ‘russellrao’, ‘seuclidean’,
69
- ‘sokalmichener’, ‘sokalsneath’, ‘sqeuclidean’, ‘wminkowski’, ‘yule’.
+ the distance function can be 'braycurtis', 'canberra', 'chebyshev', 'cityblock',
+ 'correlation', 'cosine', 'dice', 'euclidean', 'hamming', 'jaccard', 'kulsinski',
+ 'mahalanobis', 'matching', 'minkowski', 'rogerstanimoto', 'russellrao', 'seuclidean',
+ 'sokalmichener', 'sokalsneath', 'sqeuclidean', 'wminkowski', 'yule'.
70
71
72
Returns
0 commit comments