@@ -497,7 +497,7 @@ class label
497
497
498
498
if (ys is not None ) and (yt is not None ):
499
499
500
- if self .limit_max != np .infty :
500
+ if self .limit_max != np .inf :
501
501
self .limit_max = self .limit_max * nx .max (self .cost_ )
502
502
503
503
# missing_labels is a (ns, nt) matrix of {0, 1} such that
@@ -519,7 +519,7 @@ class label
519
519
cost_correction = label_match * missing_labels * self .limit_max
520
520
# this operation is necessary because 0 * Inf = NAN
521
521
# thus is irrelevant when limit_max is finite
522
- cost_correction = nx .nan_to_num (cost_correction , - np .infty )
522
+ cost_correction = nx .nan_to_num (cost_correction , - np .inf )
523
523
self .cost_ = nx .maximum (self .cost_ , cost_correction )
524
524
525
525
# distribution estimation
@@ -1067,7 +1067,7 @@ class SinkhornTransport(BaseTransport):
1067
1067
method from :ref:`[66]
1068
1068
<references-sinkhorntransport>` and :ref:`[19]
1069
1069
<references-sinkhorntransport>`.
1070
- limit_max: float, optional (default=np.infty )
1070
+ limit_max: float, optional (default=np.inf )
1071
1071
Controls the semi supervised mode. Transport between labeled source
1072
1072
and target samples of different classes will exhibit an cost defined
1073
1073
by this variable
@@ -1109,7 +1109,7 @@ def __init__(self, reg_e=1., method="sinkhorn_log", max_iter=1000,
1109
1109
tol = 10e-9 , verbose = False , log = False ,
1110
1110
metric = "sqeuclidean" , norm = None ,
1111
1111
distribution_estimation = distribution_estimation_uniform ,
1112
- out_of_sample_map = 'continuous' , limit_max = np .infty ):
1112
+ out_of_sample_map = 'continuous' , limit_max = np .inf ):
1113
1113
1114
1114
if out_of_sample_map not in ['ferradans' , 'continuous' ]:
1115
1115
raise ValueError ('Unknown out_of_sample_map method' )
@@ -1417,7 +1417,7 @@ class SinkhornLpl1Transport(BaseTransport):
1417
1417
The kind of out of sample mapping to apply to transport samples
1418
1418
from a domain into another one. Currently the only possible option is
1419
1419
"ferradans" which uses the method proposed in :ref:`[6] <references-sinkhornlpl1transport>`.
1420
- limit_max: float, optional (default=np.infty )
1420
+ limit_max: float, optional (default=np.inf )
1421
1421
Controls the semi supervised mode. Transport between labeled source
1422
1422
and target samples of different classes will exhibit a cost defined by
1423
1423
limit_max.
@@ -1450,7 +1450,7 @@ def __init__(self, reg_e=1., reg_cl=0.1,
1450
1450
tol = 10e-9 , verbose = False ,
1451
1451
metric = "sqeuclidean" , norm = None ,
1452
1452
distribution_estimation = distribution_estimation_uniform ,
1453
- out_of_sample_map = 'ferradans' , limit_max = np .infty ):
1453
+ out_of_sample_map = 'ferradans' , limit_max = np .inf ):
1454
1454
self .reg_e = reg_e
1455
1455
self .reg_cl = reg_cl
1456
1456
self .max_iter = max_iter
0 commit comments