diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/plot_OTDA_mapping_color_images.py | 3 | ||||
-rw-r--r-- | examples/plot_WDA.py | 3 | ||||
-rw-r--r-- | examples/plot_optim_OTreg.py | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/examples/plot_OTDA_mapping_color_images.py b/examples/plot_OTDA_mapping_color_images.py index b42dcdc..85c4b6b 100644 --- a/examples/plot_OTDA_mapping_color_images.py +++ b/examples/plot_OTDA_mapping_color_images.py @@ -36,6 +36,7 @@ pl.axis('off') pl.title('Image 2') pl.tight_layout() + #%% Image conversion and dataset generation def im2mat(I): @@ -78,7 +79,9 @@ pl.ylabel('Blue') pl.title('Image 2') pl.tight_layout() + #%% domain adaptation between images + def minmax(I): return np.clip(I, 0, 1) diff --git a/examples/plot_WDA.py b/examples/plot_WDA.py index 8a44022..9eb8693 100644 --- a/examples/plot_WDA.py +++ b/examples/plot_WDA.py @@ -9,8 +9,7 @@ Wasserstein Discriminant Analysis import numpy as np import matplotlib.pylab as pl -import ot -from ot.datasets import get_1D_gauss as gauss + from ot.dr import wda, fda diff --git a/examples/plot_optim_OTreg.py b/examples/plot_optim_OTreg.py index 1c3a1c5..e38253c 100644 --- a/examples/plot_optim_OTreg.py +++ b/examples/plot_optim_OTreg.py @@ -36,6 +36,7 @@ ot.plot.plot1D_mat(a, b, G0, 'OT matrix G0') #%% Example with Frobenius norm regularization + def f(G): return 0.5 * np.sum(G**2) |