Skip to content

Commit b9e69fb

Browse files
committed
Fixed multiple docstring issues
1 parent c5108ef commit b9e69fb

File tree

1 file changed

+64
-58
lines changed

1 file changed

+64
-58
lines changed

ot/da.py

Lines changed: 64 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -473,22 +473,24 @@ def joint_OT_mapping_kernel(xs, xt, mu=1, eta=0.001, kerneltype='gaussian',
473473
Weight for the linear OT loss (>0)
474474
eta : float, optional
475475
Regularization term for the linear mapping L (>0)
476-
bias : bool,optional
477-
Estimate linear mapping with constant bias
478476
kerneltype : str,optional
479477
kernel used by calling function ot.utils.kernel (gaussian by default)
480478
sigma : float, optional
481479
Gaussian kernel bandwidth.
480+
bias : bool,optional
481+
Estimate linear mapping with constant bias
482+
verbose : bool, optional
483+
Print information along iterations
484+
verbose2 : bool, optional
485+
Print information along iterations
482486
numItermax : int, optional
483487
Max number of BCD iterations
484-
stopThr : float, optional
485-
Stop threshold on relative loss decrease (>0)
486488
numInnerItermax : int, optional
487489
Max number of iterations (inner CG solver)
488490
stopInnerThr : float, optional
489491
Stop threshold on error (inner CG solver) (>0)
490-
verbose : bool, optional
491-
Print information along iterations
492+
stopThr : float, optional
493+
Stop threshold on relative loss decrease (>0)
492494
log : bool, optional
493495
record log if True
494496
@@ -1184,26 +1186,26 @@ class SinkhornTransport(BaseTransport):
11841186
algorithm if no it has not converged
11851187
tol : float, optional (default=10e-9)
11861188
The precision required to stop the optimization algorithm.
1187-
mapping : string, optional (default="barycentric")
1188-
The kind of mapping to apply to transport samples from a domain into
1189-
another one.
1190-
if "barycentric" only the samples used to estimate the coupling can
1191-
be transported from a domain to another one.
1189+
verbose : bool, optional (default=False)
1190+
Controls the verbosity of the optimization algorithm
1191+
log : int, optional (default=False)
1192+
Controls the logs of the optimization algorithm
11921193
metric : string, optional (default="sqeuclidean")
11931194
The ground metric for the Wasserstein problem
11941195
norm : string, optional (default=None)
11951196
If given, normalize the ground metric to avoid numerical errors that
11961197
can occur with large metric values.
1197-
distribution : string, optional (default="uniform")
1198+
distribution_estimation : callable, optional (defaults to the uniform)
11981199
The kind of distribution estimation to employ
1199-
verbose : int, optional (default=0)
1200-
Controls the verbosity of the optimization algorithm
1201-
log : int, optional (default=0)
1202-
Controls the logs of the optimization algorithm
1200+
out_of_sample_map : string, optional (default="ferradans")
1201+
The kind of out of sample mapping to apply to transport samples
1202+
from a domain into another one. Currently the only possible option is
1203+
"ferradans" which uses the method proposed in [6].
12031204
limit_max: float, optional (defaul=np.infty)
12041205
Controls the semi supervised mode. Transport between labeled source
1205-
and target samples of different classes will exhibit an infinite cost
1206-
1206+
and target samples of different classes will exhibit an cost defined
1207+
by this variable
1208+
12071209
Attributes
12081210
----------
12091211
coupling_ : array-like, shape (n_source_samples, n_target_samples)
@@ -1287,22 +1289,19 @@ class EMDTransport(BaseTransport):
12871289
12881290
Parameters
12891291
----------
1290-
mapping : string, optional (default="barycentric")
1291-
The kind of mapping to apply to transport samples from a domain into
1292-
another one.
1293-
if "barycentric" only the samples used to estimate the coupling can
1294-
be transported from a domain to another one.
12951292
metric : string, optional (default="sqeuclidean")
12961293
The ground metric for the Wasserstein problem
12971294
norm : string, optional (default=None)
12981295
If given, normalize the ground metric to avoid numerical errors that
12991296
can occur with large metric values.
1300-
distribution : string, optional (default="uniform")
1301-
The kind of distribution estimation to employ
1302-
verbose : int, optional (default=0)
1303-
Controls the verbosity of the optimization algorithm
1304-
log : int, optional (default=0)
1297+
log : int, optional (default=False)
13051298
Controls the logs of the optimization algorithm
1299+
distribution_estimation : callable, optional (defaults to the uniform)
1300+
The kind of distribution estimation to employ
1301+
out_of_sample_map : string, optional (default="ferradans")
1302+
The kind of out of sample mapping to apply to transport samples
1303+
from a domain into another one. Currently the only possible option is
1304+
"ferradans" which uses the method proposed in [6].
13061305
limit_max: float, optional (default=10)
13071306
Controls the semi supervised mode. Transport between labeled source
13081307
and target samples of different classes will exhibit an infinite cost
@@ -1387,28 +1386,32 @@ class SinkhornLpl1Transport(BaseTransport):
13871386
Entropic regularization parameter
13881387
reg_cl : float, optional (default=0.1)
13891388
Class regularization parameter
1390-
mapping : string, optional (default="barycentric")
1391-
The kind of mapping to apply to transport samples from a domain into
1392-
another one.
1393-
if "barycentric" only the samples used to estimate the coupling can
1394-
be transported from a domain to another one.
1395-
metric : string, optional (default="sqeuclidean")
1396-
The ground metric for the Wasserstein problem
1397-
norm : string, optional (default=None)
1398-
If given, normalize the ground metric to avoid numerical errors that
1399-
can occur with large metric values.
1400-
distribution : string, optional (default="uniform")
1401-
The kind of distribution estimation to employ
14021389
max_iter : int, float, optional (default=10)
14031390
The minimum number of iteration before stopping the optimization
14041391
algorithm if no it has not converged
14051392
max_inner_iter : int, float, optional (default=200)
14061393
The number of iteration in the inner loop
1407-
verbose : int, optional (default=0)
1394+
log : bool, optional (default=False)
1395+
Controls the logs of the optimization algorithm
1396+
tol : float, optional (default=10e-9)
1397+
Stop threshold on error (inner sinkhorn solver) (>0)
1398+
verbose : bool, optional (default=False)
14081399
Controls the verbosity of the optimization algorithm
1400+
metric : string, optional (default="sqeuclidean")
1401+
The ground metric for the Wasserstein problem
1402+
norm : string, optional (default=None)
1403+
If given, normalize the ground metric to avoid numerical errors that
1404+
can occur with large metric values.
1405+
distribution_estimation : callable, optional (defaults to the uniform)
1406+
The kind of distribution estimation to employ
1407+
out_of_sample_map : string, optional (default="ferradans")
1408+
The kind of out of sample mapping to apply to transport samples
1409+
from a domain into another one. Currently the only possible option is
1410+
"ferradans" which uses the method proposed in [6].
14091411
limit_max: float, optional (defaul=np.infty)
14101412
Controls the semi supervised mode. Transport between labeled source
1411-
and target samples of different classes will exhibit an infinite cost
1413+
and target samples of different classes will exhibit a cost defined by
1414+
limit_max.
14121415
14131416
Attributes
14141417
----------
@@ -1504,27 +1507,28 @@ class SinkhornL1l2Transport(BaseTransport):
15041507
Entropic regularization parameter
15051508
reg_cl : float, optional (default=0.1)
15061509
Class regularization parameter
1507-
mapping : string, optional (default="barycentric")
1508-
The kind of mapping to apply to transport samples from a domain into
1509-
another one.
1510-
if "barycentric" only the samples used to estimate the coupling can
1511-
be transported from a domain to another one.
1512-
metric : string, optional (default="sqeuclidean")
1513-
The ground metric for the Wasserstein problem
1514-
norm : string, optional (default=None)
1515-
If given, normalize the ground metric to avoid numerical errors that
1516-
can occur with large metric values.
1517-
distribution : string, optional (default="uniform")
1518-
The kind of distribution estimation to employ
15191510
max_iter : int, float, optional (default=10)
15201511
The minimum number of iteration before stopping the optimization
15211512
algorithm if no it has not converged
15221513
max_inner_iter : int, float, optional (default=200)
15231514
The number of iteration in the inner loop
1524-
verbose : int, optional (default=0)
1515+
tol : float, optional (default=10e-9)
1516+
Stop threshold on error (inner sinkhorn solver) (>0)
1517+
verbose : bool, optional (default=False)
15251518
Controls the verbosity of the optimization algorithm
1526-
log : int, optional (default=0)
1519+
log : bool, optional (default=False)
15271520
Controls the logs of the optimization algorithm
1521+
metric : string, optional (default="sqeuclidean")
1522+
The ground metric for the Wasserstein problem
1523+
norm : string, optional (default=None)
1524+
If given, normalize the ground metric to avoid numerical errors that
1525+
can occur with large metric values.
1526+
distribution_estimation : callable, optional (defaults to the uniform)
1527+
The kind of distribution estimation to employ
1528+
out_of_sample_map : string, optional (default="ferradans")
1529+
The kind of out of sample mapping to apply to transport samples
1530+
from a domain into another one. Currently the only possible option is
1531+
"ferradans" which uses the method proposed in [6].
15281532
limit_max: float, optional (default=10)
15291533
Controls the semi supervised mode. Transport between labeled source
15301534
and target samples of different classes will exhibit an infinite cost
@@ -1646,10 +1650,12 @@ class MappingTransport(BaseEstimator):
16461650
Max number of iterations (inner CG solver)
16471651
inner_tol : float, optional (default=1e-6)
16481652
Stop threshold on error (inner CG solver) (>0)
1649-
verbose : bool, optional (default=False)
1650-
Print information along iterations
16511653
log : bool, optional (default=False)
16521654
record log if True
1655+
verbose : bool, optional (default=False)
1656+
Print information along iterations
1657+
verbose2 : bool, optional (default=False)
1658+
Print information along iterations
16531659
16541660
Attributes
16551661
----------

0 commit comments

Comments
 (0)