diff options
author | ngayraud <nat.gayraud@gmail.com> | 2019-08-12 15:49:25 -0400 |
---|---|---|
committer | ngayraud <nat.gayraud@gmail.com> | 2019-08-12 15:49:25 -0400 |
commit | 092866815cf906012f9194b87af1e7ae0270f7e7 (patch) | |
tree | b98dfb4a0ac9165d22f8276f6f3a481e8b316f97 /ot/utils.py | |
parent | b2157e9b3458388571f6ae87d80f47f500dfa166 (diff) |
Added Unbalaced transport to domain adaptation methods. Corrected small bug related to warnings in unbalaced.py . Added an error message when user wants to normalize with other than expected cost normalization functions.
Diffstat (limited to 'ot/utils.py')
-rw-r--r-- | ot/utils.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ot/utils.py b/ot/utils.py index 8419c83..be839f8 100644 --- a/ot/utils.py +++ b/ot/utils.py @@ -186,7 +186,10 @@ def cost_normalization(C, norm=None): C = np.log(1 + C) elif norm == "loglog": C = np.log1p(np.log1p(C)) - + else: + raise ValueError(f'Norm {norm} is not a valid option. ' + f'Valid options are:\n' + f'median, max, log, loglog') return C |