From 092866815cf906012f9194b87af1e7ae0270f7e7 Mon Sep 17 00:00:00 2001 From: ngayraud Date: Mon, 12 Aug 2019 15:49:25 -0400 Subject: 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. --- ot/utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ot/utils.py') 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 -- cgit v1.2.3